include/gen/fasttest_gen.inl.h#

    1//
    2// include/gen/fasttest_gen.inl.h
    3// Generated by AMC
    4//
    5// Copyright (C) 2008-2013 AlgoEngineering LLC
    6// Copyright (C) 2013-2019 NYSE | Intercontinental Exchange
    7// Copyright (C) 2020-2023 Astra
    8// Copyright (C) 2023 AlgoRND
    9//
   10// This source code constitutes confidential information and trade secrets
   11// of AlgoRND. Unauthorized copying, distribution or sharing of this file,
   12// via any medium, is strictly prohibited.
   13//
   14
   15
   16#pragma once
   17#include "include/gen/algo_gen.inl.h"
   18//#pragma endinclude
   19inline fasttest::BVConst::BVConst() {
   20    fasttest::BVConst_Init(*this);
   21}
   22
   23
   24// --- fasttest.BVConst.base.Castdown
   25// Check if fasttest::TemplateHeader is an instance of BVConst by checking the type field
   26// If it is, return the pointer of target type.
   27// Additionally, check if the length field permits valid instance of BVConst.
   28// If not successful, quietly return NULL.
   29inline fasttest::BVConst* fasttest::BVConst_Castdown(fasttest::TemplateHeader &hdr) {
   30    bool cond = hdr.id == (23);
   31    cond &= i32(hdr.length) >= ssizeof(fasttest::BVConst);
   32    return cond ? reinterpret_cast<fasttest::BVConst*>(&hdr) : NULL;
   33}
   34
   35// --- fasttest.BVConst.base.Castbase
   36inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVConst& parent) {
   37    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
   38}
   39
   40// --- fasttest.BVConst.Value.Get
   41inline algo::strptr fasttest::Value_Get(fasttest::BVConst& parent) {
   42    (void)parent;
   43    return algo::strptr("B23");
   44}
   45
   46// --- fasttest.BVConst..GetMsgLength
   47// Message length (uses length field)
   48inline i32 fasttest::GetMsgLength(const fasttest::BVConst& parent) {
   49    return i32(const_cast<fasttest::BVConst&>(parent).length);
   50}
   51
   52// --- fasttest.BVConst..GetMsgMemptr
   53// Memptr encompassing the message (uses length field)
   54inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVConst& row) {
   55    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVConst&>(row).length));
   56}
   57
   58// --- fasttest.BVConst..Init
   59// Set all fields to initial values.
   60inline void fasttest::BVConst_Init(fasttest::BVConst& parent) {
   61    parent.length = u32(ssizeof(parent) + (0));
   62    parent.id = u32(23);
   63}
   64inline fasttest::BVConstOpt::BVConstOpt() {
   65    fasttest::BVConstOpt_Init(*this);
   66}
   67
   68
   69// --- fasttest.BVConstOpt.base.Castdown
   70// Check if fasttest::TemplateHeader is an instance of BVConstOpt by checking the type field
   71// If it is, return the pointer of target type.
   72// Additionally, check if the length field permits valid instance of BVConstOpt.
   73// If not successful, quietly return NULL.
   74inline fasttest::BVConstOpt* fasttest::BVConstOpt_Castdown(fasttest::TemplateHeader &hdr) {
   75    bool cond = hdr.id == (24);
   76    cond &= i32(hdr.length) >= ssizeof(fasttest::BVConstOpt);
   77    return cond ? reinterpret_cast<fasttest::BVConstOpt*>(&hdr) : NULL;
   78}
   79
   80// --- fasttest.BVConstOpt.base.Castbase
   81inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVConstOpt& parent) {
   82    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
   83}
   84
   85// --- fasttest.BVConstOpt.pmask.N
   86// Return constant 1
   87inline int fasttest::pmask_N(fasttest::BVConstOpt& parent) {
   88    (void)parent;
   89    return 1;
   90}
   91
   92// --- fasttest.BVConstOpt.pmask.qFind
   93// Access value
   94inline u32& fasttest::pmask_qFind(fasttest::BVConstOpt& parent, int) {
   95    return parent.pmask;
   96}
   97
   98// --- fasttest.BVConstOpt.pmask.NBits
   99// Get max # of bits in the bitset
  100// Return max. number of bits supported by array
  101inline int fasttest::pmask_Nbits(fasttest::BVConstOpt& parent) {
  102    return pmask_N(parent) * 32;
  103}
  104
  105// --- fasttest.BVConstOpt.pmask.qGetBit
  106// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
  107inline bool fasttest::pmask_qGetBit(fasttest::BVConstOpt& parent, u32 bit_idx) {
  108    u64 elem_idx = bit_idx >> 5;
  109    u64 shift = bit_idx & 31;
  110    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  111    return bool((elem >> shift) & 1); // extract bit
  112}
  113
  114// --- fasttest.BVConstOpt.pmask.GetBit
  115// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
  116inline bool fasttest::pmask_GetBit(fasttest::BVConstOpt& parent, u32 bit_idx) {
  117    u64 elem_idx = bit_idx >> 5;
  118    u64 shift = bit_idx & 31;
  119    bool ret = false;
  120    u64 lim = pmask_N(parent);
  121    if (elem_idx < lim) {
  122        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  123        ret = (elem >> shift) & 1;                 // extract bit
  124    }
  125    return ret;
  126}
  127
  128// --- fasttest.BVConstOpt.pmask.BitsEmptyQ
  129// Check if all the bits in the bitset are equal to zero
  130inline bool fasttest::pmask_BitsEmptyQ(fasttest::BVConstOpt& parent) {
  131    bool retval = true;
  132    u64 n = pmask_N(parent);
  133    for (u64 i = 0; i < n; i++) {
  134        if (pmask_qFind(parent,i) != 0) {
  135            retval = false;
  136            break;
  137        }
  138    }
  139    return retval;
  140}
  141
  142// --- fasttest.BVConstOpt.pmask.Sum1s
  143inline u64 fasttest::pmask_Sum1s(fasttest::BVConstOpt& parent) {
  144    u64 sum = 0;
  145    u64 n = pmask_N(parent);
  146    for (u64 i = 0; i < n; i++) {
  147        sum += algo::u32_Count1s(pmask_qFind(parent, i));
  148    }
  149    return sum;
  150}
  151
  152// --- fasttest.BVConstOpt.pmask.qClearBit
  153// Clear bit # BIT_IDX in bit set. No bounds checking
  154inline void fasttest::pmask_qClearBit(fasttest::BVConstOpt& parent, u32 bit_idx) {
  155    u64 elem_idx = bit_idx >> 5;
  156    u64 shift = bit_idx & 31;
  157    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  158    elem = elem & ~(u32(1) << shift); // clear bit
  159}
  160
  161// --- fasttest.BVConstOpt.pmask.ClearBit
  162// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
  163inline void fasttest::pmask_ClearBit(fasttest::BVConstOpt& parent, u32 bit_idx) {
  164    u64 elem_idx = bit_idx >> 5;
  165    u64 shift = bit_idx & 31;
  166    u64 lim = pmask_N(parent);
  167    if (elem_idx < lim) {
  168        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  169        elem = elem & ~(u32(1) << shift); // clear bit
  170    }
  171}
  172
  173// --- fasttest.BVConstOpt.pmask.qSetBit
  174// Set bit # BIT_IDX in bit set. No bounds checking
  175inline void fasttest::pmask_qSetBit(fasttest::BVConstOpt& parent, u32 bit_idx) {
  176    u64 elem_idx = bit_idx >> 5;
  177    u64 shift = bit_idx & 31;
  178    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  179    elem = elem | (u32(1) << shift); // set bit
  180}
  181
  182// --- fasttest.BVConstOpt.pmask.SetBit
  183// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
  184inline void fasttest::pmask_SetBit(fasttest::BVConstOpt& parent, u32 bit_idx) {
  185    u64 elem_idx = bit_idx >> 5;
  186    u64 shift = bit_idx & 31;
  187    u64 lim = pmask_N(parent);
  188    if (elem_idx < lim) {
  189        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  190        elem = elem | (u32(1) << shift); // set bit
  191    }
  192}
  193
  194// --- fasttest.BVConstOpt.pmask.qSetBitVal
  195// Set bit # BIT_IDX in bit set. No bounds checking
  196inline void fasttest::pmask_qSetBitVal(fasttest::BVConstOpt& parent, u32 bit_idx, bool val) {
  197    u64 elem_idx = bit_idx >> 5;
  198    u64 shift = bit_idx & 31;
  199    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  200    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
  201}
  202
  203// --- fasttest.BVConstOpt.pmask.qOrBitVal
  204// Or bit # BIT_IDX in bit set. No bounds checking
  205inline void fasttest::pmask_qOrBitVal(fasttest::BVConstOpt& parent, u32 bit_idx, bool val) {
  206    u64 elem_idx = bit_idx >> 5;
  207    u64 shift = bit_idx & 31;
  208    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  209    elem = elem | (u32(val) << shift); // Or in val into elem
  210}
  211
  212// --- fasttest.BVConstOpt.pmask.ClearBitsAll
  213// Set all bits of array to zero.
  214// Note: this does not change what NBits will return.
  215inline void fasttest::pmask_ClearBitsAll(fasttest::BVConstOpt& parent) {
  216    u64 n = pmask_N(parent);
  217    for (u64 i = 0; i < n; i++) {
  218        pmask_qFind(parent, i) = 0;
  219    }
  220}
  221
  222// --- fasttest.BVConstOpt.pmask.ClearBits
  223// Zero in PARENT any bits that are set in RHS.
  224inline void fasttest::pmask_ClearBits(fasttest::BVConstOpt& parent, fasttest::BVConstOpt &rhs) {
  225    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
  226    for (u64 i = 0; i < n; i++) {
  227        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
  228    }
  229}
  230
  231// --- fasttest.BVConstOpt.pmask.OrBits
  232// Set PARENT to union of two bitsets.
  233// (This function is not named Set.. to avoid triple entendre).
  234inline void fasttest::pmask_OrBits(fasttest::BVConstOpt& parent, fasttest::BVConstOpt &rhs) {
  235    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
  236    for (u64 i = 0; i < n; i++) {
  237        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
  238    }
  239}
  240
  241// --- fasttest.BVConstOpt.pmask.Sup
  242// Return smallest number N such that indexes of all 1 bits are below N
  243inline i32 fasttest::pmask_Sup(fasttest::BVConstOpt& parent) {
  244    u64 lim = pmask_N(parent);
  245    i32 ret = 0;
  246    for (int i = lim-1; i >= 0; i--) {
  247        u32 &val = pmask_qFind(parent, i);
  248        if (val) {
  249            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
  250            ret = i * 32 + bitidx;
  251            break;
  252        }
  253    }
  254    return ret;
  255}
  256
  257// --- fasttest.BVConstOpt.Value.PresentQ
  258// Return true if the field is marked in the presence mask
  259inline bool fasttest::Value_PresentQ(fasttest::BVConstOpt& parent) {
  260    return pmask_qGetBit(parent, 0);
  261}
  262
  263// --- fasttest.BVConstOpt.Value.SetPresent
  264// Set presence bit for this field in the pmask
  265inline void fasttest::Value_SetPresent(fasttest::BVConstOpt& parent) {
  266    pmask_qSetBit(parent, 0); // mark presence in pmask
  267}
  268
  269// --- fasttest.BVConstOpt.Value.Present_GetBit
  270// Return field's bit number in the pmask
  271inline int fasttest::Value_Present_GetBit(fasttest::BVConstOpt& parent) {
  272    int retval = 0;
  273    (void)parent;//only to avoid -Wunused-parameter
  274    return retval;
  275}
  276
  277// --- fasttest.BVConstOpt.Value.Get
  278inline algo::strptr fasttest::Value_Get(fasttest::BVConstOpt& parent) {
  279    (void)parent;
  280    return algo::strptr("B24");
  281}
  282
  283// --- fasttest.BVConstOpt.pmask_bitcurs.Reset
  284inline void fasttest::BVConstOpt_pmask_bitcurs_Reset(BVConstOpt_pmask_bitcurs &curs, fasttest::BVConstOpt &parent) {
  285    curs.elems = &pmask_qFind(parent,0);
  286    curs.n_elems = pmask_N(parent);
  287    curs.bit = -1;
  288    BVConstOpt_pmask_bitcurs_Next(curs);
  289}
  290
  291// --- fasttest.BVConstOpt.pmask_bitcurs.ValidQ
  292// cursor points to valid item
  293inline bool fasttest::BVConstOpt_pmask_bitcurs_ValidQ(BVConstOpt_pmask_bitcurs &curs) {
  294    return curs.bit < curs.n_elems*32;
  295}
  296
  297// --- fasttest.BVConstOpt.pmask_bitcurs.Access
  298// item access
  299inline int& fasttest::BVConstOpt_pmask_bitcurs_Access(BVConstOpt_pmask_bitcurs &curs) {
  300    return curs.bit;
  301}
  302
  303// --- fasttest.BVConstOpt..GetMsgLength
  304// Message length (uses length field)
  305inline i32 fasttest::GetMsgLength(const fasttest::BVConstOpt& parent) {
  306    return i32(const_cast<fasttest::BVConstOpt&>(parent).length);
  307}
  308
  309// --- fasttest.BVConstOpt..GetMsgMemptr
  310// Memptr encompassing the message (uses length field)
  311inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVConstOpt& row) {
  312    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVConstOpt&>(row).length));
  313}
  314
  315// --- fasttest.BVConstOpt..Init
  316// Set all fields to initial values.
  317inline void fasttest::BVConstOpt_Init(fasttest::BVConstOpt& parent) {
  318    parent.length = u32(ssizeof(parent) + (0));
  319    parent.id = u32(24);
  320    parent.pmask = u32(0);
  321}
  322inline fasttest::BVCopy::BVCopy() {
  323    fasttest::BVCopy_Init(*this);
  324}
  325
  326
  327// --- fasttest.BVCopy.base.Castdown
  328// Check if fasttest::TemplateHeader is an instance of BVCopy by checking the type field
  329// If it is, return the pointer of target type.
  330// Additionally, check if the length field permits valid instance of BVCopy.
  331// If not successful, quietly return NULL.
  332inline fasttest::BVCopy* fasttest::BVCopy_Castdown(fasttest::TemplateHeader &hdr) {
  333    bool cond = hdr.id == (58);
  334    cond &= i32(hdr.length) >= ssizeof(fasttest::BVCopy);
  335    return cond ? reinterpret_cast<fasttest::BVCopy*>(&hdr) : NULL;
  336}
  337
  338// --- fasttest.BVCopy.base.Castbase
  339inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVCopy& parent) {
  340    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
  341}
  342
  343// --- fasttest.BVCopy..GetMsgLength
  344// Message length (uses length field)
  345inline i32 fasttest::GetMsgLength(const fasttest::BVCopy& parent) {
  346    return i32(const_cast<fasttest::BVCopy&>(parent).length);
  347}
  348
  349// --- fasttest.BVCopy..GetMsgMemptr
  350// Memptr encompassing the message (uses length field)
  351inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVCopy& row) {
  352    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVCopy&>(row).length));
  353}
  354
  355// --- fasttest.BVCopy..Init
  356// Set all fields to initial values.
  357inline void fasttest::BVCopy_Init(fasttest::BVCopy& parent) {
  358    parent.length = u32(ssizeof(parent) + (0));
  359    parent.id = u32(58);
  360    parent.Value58 = algo::strptr("B58");
  361}
  362inline fasttest::BVCopyNull::BVCopyNull() {
  363    fasttest::BVCopyNull_Init(*this);
  364}
  365
  366
  367// --- fasttest.BVCopyNull.base.Castdown
  368// Check if fasttest::TemplateHeader is an instance of BVCopyNull by checking the type field
  369// If it is, return the pointer of target type.
  370// Additionally, check if the length field permits valid instance of BVCopyNull.
  371// If not successful, quietly return NULL.
  372inline fasttest::BVCopyNull* fasttest::BVCopyNull_Castdown(fasttest::TemplateHeader &hdr) {
  373    bool cond = hdr.id == (60);
  374    cond &= i32(hdr.length) >= ssizeof(fasttest::BVCopyNull);
  375    return cond ? reinterpret_cast<fasttest::BVCopyNull*>(&hdr) : NULL;
  376}
  377
  378// --- fasttest.BVCopyNull.base.Castbase
  379inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVCopyNull& parent) {
  380    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
  381}
  382
  383// --- fasttest.BVCopyNull.pmask.N
  384// Return constant 1
  385inline int fasttest::pmask_N(fasttest::BVCopyNull& parent) {
  386    (void)parent;
  387    return 1;
  388}
  389
  390// --- fasttest.BVCopyNull.pmask.qFind
  391// Access value
  392inline u32& fasttest::pmask_qFind(fasttest::BVCopyNull& parent, int) {
  393    return parent.pmask;
  394}
  395
  396// --- fasttest.BVCopyNull.pmask.NBits
  397// Get max # of bits in the bitset
  398// Return max. number of bits supported by array
  399inline int fasttest::pmask_Nbits(fasttest::BVCopyNull& parent) {
  400    return pmask_N(parent) * 32;
  401}
  402
  403// --- fasttest.BVCopyNull.pmask.qGetBit
  404// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
  405inline bool fasttest::pmask_qGetBit(fasttest::BVCopyNull& parent, u32 bit_idx) {
  406    u64 elem_idx = bit_idx >> 5;
  407    u64 shift = bit_idx & 31;
  408    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  409    return bool((elem >> shift) & 1); // extract bit
  410}
  411
  412// --- fasttest.BVCopyNull.pmask.GetBit
  413// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
  414inline bool fasttest::pmask_GetBit(fasttest::BVCopyNull& parent, u32 bit_idx) {
  415    u64 elem_idx = bit_idx >> 5;
  416    u64 shift = bit_idx & 31;
  417    bool ret = false;
  418    u64 lim = pmask_N(parent);
  419    if (elem_idx < lim) {
  420        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  421        ret = (elem >> shift) & 1;                 // extract bit
  422    }
  423    return ret;
  424}
  425
  426// --- fasttest.BVCopyNull.pmask.BitsEmptyQ
  427// Check if all the bits in the bitset are equal to zero
  428inline bool fasttest::pmask_BitsEmptyQ(fasttest::BVCopyNull& parent) {
  429    bool retval = true;
  430    u64 n = pmask_N(parent);
  431    for (u64 i = 0; i < n; i++) {
  432        if (pmask_qFind(parent,i) != 0) {
  433            retval = false;
  434            break;
  435        }
  436    }
  437    return retval;
  438}
  439
  440// --- fasttest.BVCopyNull.pmask.Sum1s
  441inline u64 fasttest::pmask_Sum1s(fasttest::BVCopyNull& parent) {
  442    u64 sum = 0;
  443    u64 n = pmask_N(parent);
  444    for (u64 i = 0; i < n; i++) {
  445        sum += algo::u32_Count1s(pmask_qFind(parent, i));
  446    }
  447    return sum;
  448}
  449
  450// --- fasttest.BVCopyNull.pmask.qClearBit
  451// Clear bit # BIT_IDX in bit set. No bounds checking
  452inline void fasttest::pmask_qClearBit(fasttest::BVCopyNull& parent, u32 bit_idx) {
  453    u64 elem_idx = bit_idx >> 5;
  454    u64 shift = bit_idx & 31;
  455    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  456    elem = elem & ~(u32(1) << shift); // clear bit
  457}
  458
  459// --- fasttest.BVCopyNull.pmask.ClearBit
  460// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
  461inline void fasttest::pmask_ClearBit(fasttest::BVCopyNull& parent, u32 bit_idx) {
  462    u64 elem_idx = bit_idx >> 5;
  463    u64 shift = bit_idx & 31;
  464    u64 lim = pmask_N(parent);
  465    if (elem_idx < lim) {
  466        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  467        elem = elem & ~(u32(1) << shift); // clear bit
  468    }
  469}
  470
  471// --- fasttest.BVCopyNull.pmask.qSetBit
  472// Set bit # BIT_IDX in bit set. No bounds checking
  473inline void fasttest::pmask_qSetBit(fasttest::BVCopyNull& parent, u32 bit_idx) {
  474    u64 elem_idx = bit_idx >> 5;
  475    u64 shift = bit_idx & 31;
  476    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  477    elem = elem | (u32(1) << shift); // set bit
  478}
  479
  480// --- fasttest.BVCopyNull.pmask.SetBit
  481// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
  482inline void fasttest::pmask_SetBit(fasttest::BVCopyNull& parent, u32 bit_idx) {
  483    u64 elem_idx = bit_idx >> 5;
  484    u64 shift = bit_idx & 31;
  485    u64 lim = pmask_N(parent);
  486    if (elem_idx < lim) {
  487        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  488        elem = elem | (u32(1) << shift); // set bit
  489    }
  490}
  491
  492// --- fasttest.BVCopyNull.pmask.qSetBitVal
  493// Set bit # BIT_IDX in bit set. No bounds checking
  494inline void fasttest::pmask_qSetBitVal(fasttest::BVCopyNull& parent, u32 bit_idx, bool val) {
  495    u64 elem_idx = bit_idx >> 5;
  496    u64 shift = bit_idx & 31;
  497    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  498    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
  499}
  500
  501// --- fasttest.BVCopyNull.pmask.qOrBitVal
  502// Or bit # BIT_IDX in bit set. No bounds checking
  503inline void fasttest::pmask_qOrBitVal(fasttest::BVCopyNull& parent, u32 bit_idx, bool val) {
  504    u64 elem_idx = bit_idx >> 5;
  505    u64 shift = bit_idx & 31;
  506    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  507    elem = elem | (u32(val) << shift); // Or in val into elem
  508}
  509
  510// --- fasttest.BVCopyNull.pmask.ClearBitsAll
  511// Set all bits of array to zero.
  512// Note: this does not change what NBits will return.
  513inline void fasttest::pmask_ClearBitsAll(fasttest::BVCopyNull& parent) {
  514    u64 n = pmask_N(parent);
  515    for (u64 i = 0; i < n; i++) {
  516        pmask_qFind(parent, i) = 0;
  517    }
  518}
  519
  520// --- fasttest.BVCopyNull.pmask.ClearBits
  521// Zero in PARENT any bits that are set in RHS.
  522inline void fasttest::pmask_ClearBits(fasttest::BVCopyNull& parent, fasttest::BVCopyNull &rhs) {
  523    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
  524    for (u64 i = 0; i < n; i++) {
  525        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
  526    }
  527}
  528
  529// --- fasttest.BVCopyNull.pmask.OrBits
  530// Set PARENT to union of two bitsets.
  531// (This function is not named Set.. to avoid triple entendre).
  532inline void fasttest::pmask_OrBits(fasttest::BVCopyNull& parent, fasttest::BVCopyNull &rhs) {
  533    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
  534    for (u64 i = 0; i < n; i++) {
  535        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
  536    }
  537}
  538
  539// --- fasttest.BVCopyNull.pmask.Sup
  540// Return smallest number N such that indexes of all 1 bits are below N
  541inline i32 fasttest::pmask_Sup(fasttest::BVCopyNull& parent) {
  542    u64 lim = pmask_N(parent);
  543    i32 ret = 0;
  544    for (int i = lim-1; i >= 0; i--) {
  545        u32 &val = pmask_qFind(parent, i);
  546        if (val) {
  547            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
  548            ret = i * 32 + bitidx;
  549            break;
  550        }
  551    }
  552    return ret;
  553}
  554
  555// --- fasttest.BVCopyNull.Value60.PresentQ
  556// Return true if the field is marked in the presence mask
  557inline bool fasttest::Value60_PresentQ(fasttest::BVCopyNull& parent) {
  558    return pmask_qGetBit(parent, 0);
  559}
  560
  561// --- fasttest.BVCopyNull.Value60.SetPresent
  562// Set presence bit for this field in the pmask
  563inline void fasttest::Value60_SetPresent(fasttest::BVCopyNull& parent) {
  564    pmask_qSetBit(parent, 0); // mark presence in pmask
  565}
  566
  567// --- fasttest.BVCopyNull.Value60.Present_GetBit
  568// Return field's bit number in the pmask
  569inline int fasttest::Value60_Present_GetBit(fasttest::BVCopyNull& parent) {
  570    int retval = 0;
  571    (void)parent;//only to avoid -Wunused-parameter
  572    return retval;
  573}
  574
  575// --- fasttest.BVCopyNull.Value60.Set
  576inline void fasttest::Value60_Set(fasttest::BVCopyNull& parent, const algo::strptr& rhs) {
  577    parent.Value60 = rhs;
  578    pmask_qSetBit(parent, 0); // mark presence in pmask
  579}
  580
  581// --- fasttest.BVCopyNull.pmask_bitcurs.Reset
  582inline void fasttest::BVCopyNull_pmask_bitcurs_Reset(BVCopyNull_pmask_bitcurs &curs, fasttest::BVCopyNull &parent) {
  583    curs.elems = &pmask_qFind(parent,0);
  584    curs.n_elems = pmask_N(parent);
  585    curs.bit = -1;
  586    BVCopyNull_pmask_bitcurs_Next(curs);
  587}
  588
  589// --- fasttest.BVCopyNull.pmask_bitcurs.ValidQ
  590// cursor points to valid item
  591inline bool fasttest::BVCopyNull_pmask_bitcurs_ValidQ(BVCopyNull_pmask_bitcurs &curs) {
  592    return curs.bit < curs.n_elems*32;
  593}
  594
  595// --- fasttest.BVCopyNull.pmask_bitcurs.Access
  596// item access
  597inline int& fasttest::BVCopyNull_pmask_bitcurs_Access(BVCopyNull_pmask_bitcurs &curs) {
  598    return curs.bit;
  599}
  600
  601// --- fasttest.BVCopyNull..GetMsgLength
  602// Message length (uses length field)
  603inline i32 fasttest::GetMsgLength(const fasttest::BVCopyNull& parent) {
  604    return i32(const_cast<fasttest::BVCopyNull&>(parent).length);
  605}
  606
  607// --- fasttest.BVCopyNull..GetMsgMemptr
  608// Memptr encompassing the message (uses length field)
  609inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVCopyNull& row) {
  610    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVCopyNull&>(row).length));
  611}
  612
  613// --- fasttest.BVCopyNull..Init
  614// Set all fields to initial values.
  615inline void fasttest::BVCopyNull_Init(fasttest::BVCopyNull& parent) {
  616    parent.length = u32(ssizeof(parent) + (0));
  617    parent.id = u32(60);
  618    parent.pmask = u32(0);
  619}
  620inline fasttest::BVCopyOpt::BVCopyOpt() {
  621    fasttest::BVCopyOpt_Init(*this);
  622}
  623
  624
  625// --- fasttest.BVCopyOpt.base.Castdown
  626// Check if fasttest::TemplateHeader is an instance of BVCopyOpt by checking the type field
  627// If it is, return the pointer of target type.
  628// Additionally, check if the length field permits valid instance of BVCopyOpt.
  629// If not successful, quietly return NULL.
  630inline fasttest::BVCopyOpt* fasttest::BVCopyOpt_Castdown(fasttest::TemplateHeader &hdr) {
  631    bool cond = hdr.id == (59);
  632    cond &= i32(hdr.length) >= ssizeof(fasttest::BVCopyOpt);
  633    return cond ? reinterpret_cast<fasttest::BVCopyOpt*>(&hdr) : NULL;
  634}
  635
  636// --- fasttest.BVCopyOpt.base.Castbase
  637inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVCopyOpt& parent) {
  638    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
  639}
  640
  641// --- fasttest.BVCopyOpt.pmask.N
  642// Return constant 1
  643inline int fasttest::pmask_N(fasttest::BVCopyOpt& parent) {
  644    (void)parent;
  645    return 1;
  646}
  647
  648// --- fasttest.BVCopyOpt.pmask.qFind
  649// Access value
  650inline u32& fasttest::pmask_qFind(fasttest::BVCopyOpt& parent, int) {
  651    return parent.pmask;
  652}
  653
  654// --- fasttest.BVCopyOpt.pmask.NBits
  655// Get max # of bits in the bitset
  656// Return max. number of bits supported by array
  657inline int fasttest::pmask_Nbits(fasttest::BVCopyOpt& parent) {
  658    return pmask_N(parent) * 32;
  659}
  660
  661// --- fasttest.BVCopyOpt.pmask.qGetBit
  662// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
  663inline bool fasttest::pmask_qGetBit(fasttest::BVCopyOpt& parent, u32 bit_idx) {
  664    u64 elem_idx = bit_idx >> 5;
  665    u64 shift = bit_idx & 31;
  666    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  667    return bool((elem >> shift) & 1); // extract bit
  668}
  669
  670// --- fasttest.BVCopyOpt.pmask.GetBit
  671// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
  672inline bool fasttest::pmask_GetBit(fasttest::BVCopyOpt& parent, u32 bit_idx) {
  673    u64 elem_idx = bit_idx >> 5;
  674    u64 shift = bit_idx & 31;
  675    bool ret = false;
  676    u64 lim = pmask_N(parent);
  677    if (elem_idx < lim) {
  678        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  679        ret = (elem >> shift) & 1;                 // extract bit
  680    }
  681    return ret;
  682}
  683
  684// --- fasttest.BVCopyOpt.pmask.BitsEmptyQ
  685// Check if all the bits in the bitset are equal to zero
  686inline bool fasttest::pmask_BitsEmptyQ(fasttest::BVCopyOpt& parent) {
  687    bool retval = true;
  688    u64 n = pmask_N(parent);
  689    for (u64 i = 0; i < n; i++) {
  690        if (pmask_qFind(parent,i) != 0) {
  691            retval = false;
  692            break;
  693        }
  694    }
  695    return retval;
  696}
  697
  698// --- fasttest.BVCopyOpt.pmask.Sum1s
  699inline u64 fasttest::pmask_Sum1s(fasttest::BVCopyOpt& parent) {
  700    u64 sum = 0;
  701    u64 n = pmask_N(parent);
  702    for (u64 i = 0; i < n; i++) {
  703        sum += algo::u32_Count1s(pmask_qFind(parent, i));
  704    }
  705    return sum;
  706}
  707
  708// --- fasttest.BVCopyOpt.pmask.qClearBit
  709// Clear bit # BIT_IDX in bit set. No bounds checking
  710inline void fasttest::pmask_qClearBit(fasttest::BVCopyOpt& parent, u32 bit_idx) {
  711    u64 elem_idx = bit_idx >> 5;
  712    u64 shift = bit_idx & 31;
  713    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  714    elem = elem & ~(u32(1) << shift); // clear bit
  715}
  716
  717// --- fasttest.BVCopyOpt.pmask.ClearBit
  718// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
  719inline void fasttest::pmask_ClearBit(fasttest::BVCopyOpt& parent, u32 bit_idx) {
  720    u64 elem_idx = bit_idx >> 5;
  721    u64 shift = bit_idx & 31;
  722    u64 lim = pmask_N(parent);
  723    if (elem_idx < lim) {
  724        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  725        elem = elem & ~(u32(1) << shift); // clear bit
  726    }
  727}
  728
  729// --- fasttest.BVCopyOpt.pmask.qSetBit
  730// Set bit # BIT_IDX in bit set. No bounds checking
  731inline void fasttest::pmask_qSetBit(fasttest::BVCopyOpt& parent, u32 bit_idx) {
  732    u64 elem_idx = bit_idx >> 5;
  733    u64 shift = bit_idx & 31;
  734    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  735    elem = elem | (u32(1) << shift); // set bit
  736}
  737
  738// --- fasttest.BVCopyOpt.pmask.SetBit
  739// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
  740inline void fasttest::pmask_SetBit(fasttest::BVCopyOpt& parent, u32 bit_idx) {
  741    u64 elem_idx = bit_idx >> 5;
  742    u64 shift = bit_idx & 31;
  743    u64 lim = pmask_N(parent);
  744    if (elem_idx < lim) {
  745        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  746        elem = elem | (u32(1) << shift); // set bit
  747    }
  748}
  749
  750// --- fasttest.BVCopyOpt.pmask.qSetBitVal
  751// Set bit # BIT_IDX in bit set. No bounds checking
  752inline void fasttest::pmask_qSetBitVal(fasttest::BVCopyOpt& parent, u32 bit_idx, bool val) {
  753    u64 elem_idx = bit_idx >> 5;
  754    u64 shift = bit_idx & 31;
  755    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  756    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
  757}
  758
  759// --- fasttest.BVCopyOpt.pmask.qOrBitVal
  760// Or bit # BIT_IDX in bit set. No bounds checking
  761inline void fasttest::pmask_qOrBitVal(fasttest::BVCopyOpt& parent, u32 bit_idx, bool val) {
  762    u64 elem_idx = bit_idx >> 5;
  763    u64 shift = bit_idx & 31;
  764    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
  765    elem = elem | (u32(val) << shift); // Or in val into elem
  766}
  767
  768// --- fasttest.BVCopyOpt.pmask.ClearBitsAll
  769// Set all bits of array to zero.
  770// Note: this does not change what NBits will return.
  771inline void fasttest::pmask_ClearBitsAll(fasttest::BVCopyOpt& parent) {
  772    u64 n = pmask_N(parent);
  773    for (u64 i = 0; i < n; i++) {
  774        pmask_qFind(parent, i) = 0;
  775    }
  776}
  777
  778// --- fasttest.BVCopyOpt.pmask.ClearBits
  779// Zero in PARENT any bits that are set in RHS.
  780inline void fasttest::pmask_ClearBits(fasttest::BVCopyOpt& parent, fasttest::BVCopyOpt &rhs) {
  781    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
  782    for (u64 i = 0; i < n; i++) {
  783        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
  784    }
  785}
  786
  787// --- fasttest.BVCopyOpt.pmask.OrBits
  788// Set PARENT to union of two bitsets.
  789// (This function is not named Set.. to avoid triple entendre).
  790inline void fasttest::pmask_OrBits(fasttest::BVCopyOpt& parent, fasttest::BVCopyOpt &rhs) {
  791    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
  792    for (u64 i = 0; i < n; i++) {
  793        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
  794    }
  795}
  796
  797// --- fasttest.BVCopyOpt.pmask.Sup
  798// Return smallest number N such that indexes of all 1 bits are below N
  799inline i32 fasttest::pmask_Sup(fasttest::BVCopyOpt& parent) {
  800    u64 lim = pmask_N(parent);
  801    i32 ret = 0;
  802    for (int i = lim-1; i >= 0; i--) {
  803        u32 &val = pmask_qFind(parent, i);
  804        if (val) {
  805            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
  806            ret = i * 32 + bitidx;
  807            break;
  808        }
  809    }
  810    return ret;
  811}
  812
  813// --- fasttest.BVCopyOpt.Value59.PresentQ
  814// Return true if the field is marked in the presence mask
  815inline bool fasttest::Value59_PresentQ(fasttest::BVCopyOpt& parent) {
  816    return pmask_qGetBit(parent, 0);
  817}
  818
  819// --- fasttest.BVCopyOpt.Value59.SetPresent
  820// Set presence bit for this field in the pmask
  821inline void fasttest::Value59_SetPresent(fasttest::BVCopyOpt& parent) {
  822    pmask_qSetBit(parent, 0); // mark presence in pmask
  823}
  824
  825// --- fasttest.BVCopyOpt.Value59.Present_GetBit
  826// Return field's bit number in the pmask
  827inline int fasttest::Value59_Present_GetBit(fasttest::BVCopyOpt& parent) {
  828    int retval = 0;
  829    (void)parent;//only to avoid -Wunused-parameter
  830    return retval;
  831}
  832
  833// --- fasttest.BVCopyOpt.Value59.Set
  834inline void fasttest::Value59_Set(fasttest::BVCopyOpt& parent, const algo::strptr& rhs) {
  835    parent.Value59 = rhs;
  836    pmask_qSetBit(parent, 0); // mark presence in pmask
  837}
  838
  839// --- fasttest.BVCopyOpt.pmask_bitcurs.Reset
  840inline void fasttest::BVCopyOpt_pmask_bitcurs_Reset(BVCopyOpt_pmask_bitcurs &curs, fasttest::BVCopyOpt &parent) {
  841    curs.elems = &pmask_qFind(parent,0);
  842    curs.n_elems = pmask_N(parent);
  843    curs.bit = -1;
  844    BVCopyOpt_pmask_bitcurs_Next(curs);
  845}
  846
  847// --- fasttest.BVCopyOpt.pmask_bitcurs.ValidQ
  848// cursor points to valid item
  849inline bool fasttest::BVCopyOpt_pmask_bitcurs_ValidQ(BVCopyOpt_pmask_bitcurs &curs) {
  850    return curs.bit < curs.n_elems*32;
  851}
  852
  853// --- fasttest.BVCopyOpt.pmask_bitcurs.Access
  854// item access
  855inline int& fasttest::BVCopyOpt_pmask_bitcurs_Access(BVCopyOpt_pmask_bitcurs &curs) {
  856    return curs.bit;
  857}
  858
  859// --- fasttest.BVCopyOpt..GetMsgLength
  860// Message length (uses length field)
  861inline i32 fasttest::GetMsgLength(const fasttest::BVCopyOpt& parent) {
  862    return i32(const_cast<fasttest::BVCopyOpt&>(parent).length);
  863}
  864
  865// --- fasttest.BVCopyOpt..GetMsgMemptr
  866// Memptr encompassing the message (uses length field)
  867inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVCopyOpt& row) {
  868    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVCopyOpt&>(row).length));
  869}
  870
  871// --- fasttest.BVCopyOpt..Init
  872// Set all fields to initial values.
  873inline void fasttest::BVCopyOpt_Init(fasttest::BVCopyOpt& parent) {
  874    parent.length = u32(ssizeof(parent) + (0));
  875    parent.id = u32(59);
  876    parent.pmask = u32(0);
  877    parent.Value59 = algo::strptr("B59");
  878}
  879inline fasttest::BVDflt::BVDflt() {
  880    fasttest::BVDflt_Init(*this);
  881}
  882
  883
  884// --- fasttest.BVDflt.base.Castdown
  885// Check if fasttest::TemplateHeader is an instance of BVDflt by checking the type field
  886// If it is, return the pointer of target type.
  887// Additionally, check if the length field permits valid instance of BVDflt.
  888// If not successful, quietly return NULL.
  889inline fasttest::BVDflt* fasttest::BVDflt_Castdown(fasttest::TemplateHeader &hdr) {
  890    bool cond = hdr.id == (42);
  891    cond &= i32(hdr.length) >= ssizeof(fasttest::BVDflt);
  892    return cond ? reinterpret_cast<fasttest::BVDflt*>(&hdr) : NULL;
  893}
  894
  895// --- fasttest.BVDflt.base.Castbase
  896inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVDflt& parent) {
  897    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
  898}
  899
  900// --- fasttest.BVDflt..GetMsgLength
  901// Message length (uses length field)
  902inline i32 fasttest::GetMsgLength(const fasttest::BVDflt& parent) {
  903    return i32(const_cast<fasttest::BVDflt&>(parent).length);
  904}
  905
  906// --- fasttest.BVDflt..GetMsgMemptr
  907// Memptr encompassing the message (uses length field)
  908inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVDflt& row) {
  909    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVDflt&>(row).length));
  910}
  911
  912// --- fasttest.BVDflt..Init
  913// Set all fields to initial values.
  914inline void fasttest::BVDflt_Init(fasttest::BVDflt& parent) {
  915    parent.length = u32(ssizeof(parent) + (0));
  916    parent.id = u32(42);
  917    parent.Value = algo::strptr("B42");
  918}
  919inline fasttest::BVDfltNull::BVDfltNull() {
  920    fasttest::BVDfltNull_Init(*this);
  921}
  922
  923
  924// --- fasttest.BVDfltNull.base.Castdown
  925// Check if fasttest::TemplateHeader is an instance of BVDfltNull by checking the type field
  926// If it is, return the pointer of target type.
  927// Additionally, check if the length field permits valid instance of BVDfltNull.
  928// If not successful, quietly return NULL.
  929inline fasttest::BVDfltNull* fasttest::BVDfltNull_Castdown(fasttest::TemplateHeader &hdr) {
  930    bool cond = hdr.id == (44);
  931    cond &= i32(hdr.length) >= ssizeof(fasttest::BVDfltNull);
  932    return cond ? reinterpret_cast<fasttest::BVDfltNull*>(&hdr) : NULL;
  933}
  934
  935// --- fasttest.BVDfltNull.base.Castbase
  936inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVDfltNull& parent) {
  937    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
  938}
  939
  940// --- fasttest.BVDfltNull.pmask.N
  941// Return constant 1
  942inline int fasttest::pmask_N(fasttest::BVDfltNull& parent) {
  943    (void)parent;
  944    return 1;
  945}
  946
  947// --- fasttest.BVDfltNull.pmask.qFind
  948// Access value
  949inline u32& fasttest::pmask_qFind(fasttest::BVDfltNull& parent, int) {
  950    return parent.pmask;
  951}
  952
  953// --- fasttest.BVDfltNull.pmask.NBits
  954// Get max # of bits in the bitset
  955// Return max. number of bits supported by array
  956inline int fasttest::pmask_Nbits(fasttest::BVDfltNull& parent) {
  957    return pmask_N(parent) * 32;
  958}
  959
  960// --- fasttest.BVDfltNull.pmask.qGetBit
  961// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
  962inline bool fasttest::pmask_qGetBit(fasttest::BVDfltNull& parent, u32 bit_idx) {
  963    u64 elem_idx = bit_idx >> 5;
  964    u64 shift = bit_idx & 31;
  965    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  966    return bool((elem >> shift) & 1); // extract bit
  967}
  968
  969// --- fasttest.BVDfltNull.pmask.GetBit
  970// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
  971inline bool fasttest::pmask_GetBit(fasttest::BVDfltNull& parent, u32 bit_idx) {
  972    u64 elem_idx = bit_idx >> 5;
  973    u64 shift = bit_idx & 31;
  974    bool ret = false;
  975    u64 lim = pmask_N(parent);
  976    if (elem_idx < lim) {
  977        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
  978        ret = (elem >> shift) & 1;                 // extract bit
  979    }
  980    return ret;
  981}
  982
  983// --- fasttest.BVDfltNull.pmask.BitsEmptyQ
  984// Check if all the bits in the bitset are equal to zero
  985inline bool fasttest::pmask_BitsEmptyQ(fasttest::BVDfltNull& parent) {
  986    bool retval = true;
  987    u64 n = pmask_N(parent);
  988    for (u64 i = 0; i < n; i++) {
  989        if (pmask_qFind(parent,i) != 0) {
  990            retval = false;
  991            break;
  992        }
  993    }
  994    return retval;
  995}
  996
  997// --- fasttest.BVDfltNull.pmask.Sum1s
  998inline u64 fasttest::pmask_Sum1s(fasttest::BVDfltNull& parent) {
  999    u64 sum = 0;
 1000    u64 n = pmask_N(parent);
 1001    for (u64 i = 0; i < n; i++) {
 1002        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 1003    }
 1004    return sum;
 1005}
 1006
 1007// --- fasttest.BVDfltNull.pmask.qClearBit
 1008// Clear bit # BIT_IDX in bit set. No bounds checking
 1009inline void fasttest::pmask_qClearBit(fasttest::BVDfltNull& parent, u32 bit_idx) {
 1010    u64 elem_idx = bit_idx >> 5;
 1011    u64 shift = bit_idx & 31;
 1012    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1013    elem = elem & ~(u32(1) << shift); // clear bit
 1014}
 1015
 1016// --- fasttest.BVDfltNull.pmask.ClearBit
 1017// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 1018inline void fasttest::pmask_ClearBit(fasttest::BVDfltNull& parent, u32 bit_idx) {
 1019    u64 elem_idx = bit_idx >> 5;
 1020    u64 shift = bit_idx & 31;
 1021    u64 lim = pmask_N(parent);
 1022    if (elem_idx < lim) {
 1023        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1024        elem = elem & ~(u32(1) << shift); // clear bit
 1025    }
 1026}
 1027
 1028// --- fasttest.BVDfltNull.pmask.qSetBit
 1029// Set bit # BIT_IDX in bit set. No bounds checking
 1030inline void fasttest::pmask_qSetBit(fasttest::BVDfltNull& parent, u32 bit_idx) {
 1031    u64 elem_idx = bit_idx >> 5;
 1032    u64 shift = bit_idx & 31;
 1033    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1034    elem = elem | (u32(1) << shift); // set bit
 1035}
 1036
 1037// --- fasttest.BVDfltNull.pmask.SetBit
 1038// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 1039inline void fasttest::pmask_SetBit(fasttest::BVDfltNull& parent, u32 bit_idx) {
 1040    u64 elem_idx = bit_idx >> 5;
 1041    u64 shift = bit_idx & 31;
 1042    u64 lim = pmask_N(parent);
 1043    if (elem_idx < lim) {
 1044        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1045        elem = elem | (u32(1) << shift); // set bit
 1046    }
 1047}
 1048
 1049// --- fasttest.BVDfltNull.pmask.qSetBitVal
 1050// Set bit # BIT_IDX in bit set. No bounds checking
 1051inline void fasttest::pmask_qSetBitVal(fasttest::BVDfltNull& parent, u32 bit_idx, bool val) {
 1052    u64 elem_idx = bit_idx >> 5;
 1053    u64 shift = bit_idx & 31;
 1054    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1055    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 1056}
 1057
 1058// --- fasttest.BVDfltNull.pmask.qOrBitVal
 1059// Or bit # BIT_IDX in bit set. No bounds checking
 1060inline void fasttest::pmask_qOrBitVal(fasttest::BVDfltNull& parent, u32 bit_idx, bool val) {
 1061    u64 elem_idx = bit_idx >> 5;
 1062    u64 shift = bit_idx & 31;
 1063    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1064    elem = elem | (u32(val) << shift); // Or in val into elem
 1065}
 1066
 1067// --- fasttest.BVDfltNull.pmask.ClearBitsAll
 1068// Set all bits of array to zero.
 1069// Note: this does not change what NBits will return.
 1070inline void fasttest::pmask_ClearBitsAll(fasttest::BVDfltNull& parent) {
 1071    u64 n = pmask_N(parent);
 1072    for (u64 i = 0; i < n; i++) {
 1073        pmask_qFind(parent, i) = 0;
 1074    }
 1075}
 1076
 1077// --- fasttest.BVDfltNull.pmask.ClearBits
 1078// Zero in PARENT any bits that are set in RHS.
 1079inline void fasttest::pmask_ClearBits(fasttest::BVDfltNull& parent, fasttest::BVDfltNull &rhs) {
 1080    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 1081    for (u64 i = 0; i < n; i++) {
 1082        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 1083    }
 1084}
 1085
 1086// --- fasttest.BVDfltNull.pmask.OrBits
 1087// Set PARENT to union of two bitsets.
 1088// (This function is not named Set.. to avoid triple entendre).
 1089inline void fasttest::pmask_OrBits(fasttest::BVDfltNull& parent, fasttest::BVDfltNull &rhs) {
 1090    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 1091    for (u64 i = 0; i < n; i++) {
 1092        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 1093    }
 1094}
 1095
 1096// --- fasttest.BVDfltNull.pmask.Sup
 1097// Return smallest number N such that indexes of all 1 bits are below N
 1098inline i32 fasttest::pmask_Sup(fasttest::BVDfltNull& parent) {
 1099    u64 lim = pmask_N(parent);
 1100    i32 ret = 0;
 1101    for (int i = lim-1; i >= 0; i--) {
 1102        u32 &val = pmask_qFind(parent, i);
 1103        if (val) {
 1104            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 1105            ret = i * 32 + bitidx;
 1106            break;
 1107        }
 1108    }
 1109    return ret;
 1110}
 1111
 1112// --- fasttest.BVDfltNull.Value.PresentQ
 1113// Return true if the field is marked in the presence mask
 1114inline bool fasttest::Value_PresentQ(fasttest::BVDfltNull& parent) {
 1115    return pmask_qGetBit(parent, 0);
 1116}
 1117
 1118// --- fasttest.BVDfltNull.Value.SetPresent
 1119// Set presence bit for this field in the pmask
 1120inline void fasttest::Value_SetPresent(fasttest::BVDfltNull& parent) {
 1121    pmask_qSetBit(parent, 0); // mark presence in pmask
 1122}
 1123
 1124// --- fasttest.BVDfltNull.Value.Present_GetBit
 1125// Return field's bit number in the pmask
 1126inline int fasttest::Value_Present_GetBit(fasttest::BVDfltNull& parent) {
 1127    int retval = 0;
 1128    (void)parent;//only to avoid -Wunused-parameter
 1129    return retval;
 1130}
 1131
 1132// --- fasttest.BVDfltNull.Value.Set
 1133inline void fasttest::Value_Set(fasttest::BVDfltNull& parent, const algo::strptr& rhs) {
 1134    parent.Value = rhs;
 1135    pmask_qSetBit(parent, 0); // mark presence in pmask
 1136}
 1137
 1138// --- fasttest.BVDfltNull.pmask_bitcurs.Reset
 1139inline void fasttest::BVDfltNull_pmask_bitcurs_Reset(BVDfltNull_pmask_bitcurs &curs, fasttest::BVDfltNull &parent) {
 1140    curs.elems = &pmask_qFind(parent,0);
 1141    curs.n_elems = pmask_N(parent);
 1142    curs.bit = -1;
 1143    BVDfltNull_pmask_bitcurs_Next(curs);
 1144}
 1145
 1146// --- fasttest.BVDfltNull.pmask_bitcurs.ValidQ
 1147// cursor points to valid item
 1148inline bool fasttest::BVDfltNull_pmask_bitcurs_ValidQ(BVDfltNull_pmask_bitcurs &curs) {
 1149    return curs.bit < curs.n_elems*32;
 1150}
 1151
 1152// --- fasttest.BVDfltNull.pmask_bitcurs.Access
 1153// item access
 1154inline int& fasttest::BVDfltNull_pmask_bitcurs_Access(BVDfltNull_pmask_bitcurs &curs) {
 1155    return curs.bit;
 1156}
 1157
 1158// --- fasttest.BVDfltNull..GetMsgLength
 1159// Message length (uses length field)
 1160inline i32 fasttest::GetMsgLength(const fasttest::BVDfltNull& parent) {
 1161    return i32(const_cast<fasttest::BVDfltNull&>(parent).length);
 1162}
 1163
 1164// --- fasttest.BVDfltNull..GetMsgMemptr
 1165// Memptr encompassing the message (uses length field)
 1166inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVDfltNull& row) {
 1167    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVDfltNull&>(row).length));
 1168}
 1169
 1170// --- fasttest.BVDfltNull..Init
 1171// Set all fields to initial values.
 1172inline void fasttest::BVDfltNull_Init(fasttest::BVDfltNull& parent) {
 1173    parent.length = u32(ssizeof(parent) + (0));
 1174    parent.id = u32(44);
 1175    parent.pmask = u32(0);
 1176}
 1177inline fasttest::BVDfltOpt::BVDfltOpt() {
 1178    fasttest::BVDfltOpt_Init(*this);
 1179}
 1180
 1181
 1182// --- fasttest.BVDfltOpt.base.Castdown
 1183// Check if fasttest::TemplateHeader is an instance of BVDfltOpt by checking the type field
 1184// If it is, return the pointer of target type.
 1185// Additionally, check if the length field permits valid instance of BVDfltOpt.
 1186// If not successful, quietly return NULL.
 1187inline fasttest::BVDfltOpt* fasttest::BVDfltOpt_Castdown(fasttest::TemplateHeader &hdr) {
 1188    bool cond = hdr.id == (43);
 1189    cond &= i32(hdr.length) >= ssizeof(fasttest::BVDfltOpt);
 1190    return cond ? reinterpret_cast<fasttest::BVDfltOpt*>(&hdr) : NULL;
 1191}
 1192
 1193// --- fasttest.BVDfltOpt.base.Castbase
 1194inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVDfltOpt& parent) {
 1195    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 1196}
 1197
 1198// --- fasttest.BVDfltOpt.pmask.N
 1199// Return constant 1
 1200inline int fasttest::pmask_N(fasttest::BVDfltOpt& parent) {
 1201    (void)parent;
 1202    return 1;
 1203}
 1204
 1205// --- fasttest.BVDfltOpt.pmask.qFind
 1206// Access value
 1207inline u32& fasttest::pmask_qFind(fasttest::BVDfltOpt& parent, int) {
 1208    return parent.pmask;
 1209}
 1210
 1211// --- fasttest.BVDfltOpt.pmask.NBits
 1212// Get max # of bits in the bitset
 1213// Return max. number of bits supported by array
 1214inline int fasttest::pmask_Nbits(fasttest::BVDfltOpt& parent) {
 1215    return pmask_N(parent) * 32;
 1216}
 1217
 1218// --- fasttest.BVDfltOpt.pmask.qGetBit
 1219// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 1220inline bool fasttest::pmask_qGetBit(fasttest::BVDfltOpt& parent, u32 bit_idx) {
 1221    u64 elem_idx = bit_idx >> 5;
 1222    u64 shift = bit_idx & 31;
 1223    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 1224    return bool((elem >> shift) & 1); // extract bit
 1225}
 1226
 1227// --- fasttest.BVDfltOpt.pmask.GetBit
 1228// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 1229inline bool fasttest::pmask_GetBit(fasttest::BVDfltOpt& parent, u32 bit_idx) {
 1230    u64 elem_idx = bit_idx >> 5;
 1231    u64 shift = bit_idx & 31;
 1232    bool ret = false;
 1233    u64 lim = pmask_N(parent);
 1234    if (elem_idx < lim) {
 1235        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 1236        ret = (elem >> shift) & 1;                 // extract bit
 1237    }
 1238    return ret;
 1239}
 1240
 1241// --- fasttest.BVDfltOpt.pmask.BitsEmptyQ
 1242// Check if all the bits in the bitset are equal to zero
 1243inline bool fasttest::pmask_BitsEmptyQ(fasttest::BVDfltOpt& parent) {
 1244    bool retval = true;
 1245    u64 n = pmask_N(parent);
 1246    for (u64 i = 0; i < n; i++) {
 1247        if (pmask_qFind(parent,i) != 0) {
 1248            retval = false;
 1249            break;
 1250        }
 1251    }
 1252    return retval;
 1253}
 1254
 1255// --- fasttest.BVDfltOpt.pmask.Sum1s
 1256inline u64 fasttest::pmask_Sum1s(fasttest::BVDfltOpt& parent) {
 1257    u64 sum = 0;
 1258    u64 n = pmask_N(parent);
 1259    for (u64 i = 0; i < n; i++) {
 1260        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 1261    }
 1262    return sum;
 1263}
 1264
 1265// --- fasttest.BVDfltOpt.pmask.qClearBit
 1266// Clear bit # BIT_IDX in bit set. No bounds checking
 1267inline void fasttest::pmask_qClearBit(fasttest::BVDfltOpt& parent, u32 bit_idx) {
 1268    u64 elem_idx = bit_idx >> 5;
 1269    u64 shift = bit_idx & 31;
 1270    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1271    elem = elem & ~(u32(1) << shift); // clear bit
 1272}
 1273
 1274// --- fasttest.BVDfltOpt.pmask.ClearBit
 1275// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 1276inline void fasttest::pmask_ClearBit(fasttest::BVDfltOpt& parent, u32 bit_idx) {
 1277    u64 elem_idx = bit_idx >> 5;
 1278    u64 shift = bit_idx & 31;
 1279    u64 lim = pmask_N(parent);
 1280    if (elem_idx < lim) {
 1281        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1282        elem = elem & ~(u32(1) << shift); // clear bit
 1283    }
 1284}
 1285
 1286// --- fasttest.BVDfltOpt.pmask.qSetBit
 1287// Set bit # BIT_IDX in bit set. No bounds checking
 1288inline void fasttest::pmask_qSetBit(fasttest::BVDfltOpt& parent, u32 bit_idx) {
 1289    u64 elem_idx = bit_idx >> 5;
 1290    u64 shift = bit_idx & 31;
 1291    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1292    elem = elem | (u32(1) << shift); // set bit
 1293}
 1294
 1295// --- fasttest.BVDfltOpt.pmask.SetBit
 1296// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 1297inline void fasttest::pmask_SetBit(fasttest::BVDfltOpt& parent, u32 bit_idx) {
 1298    u64 elem_idx = bit_idx >> 5;
 1299    u64 shift = bit_idx & 31;
 1300    u64 lim = pmask_N(parent);
 1301    if (elem_idx < lim) {
 1302        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1303        elem = elem | (u32(1) << shift); // set bit
 1304    }
 1305}
 1306
 1307// --- fasttest.BVDfltOpt.pmask.qSetBitVal
 1308// Set bit # BIT_IDX in bit set. No bounds checking
 1309inline void fasttest::pmask_qSetBitVal(fasttest::BVDfltOpt& parent, u32 bit_idx, bool val) {
 1310    u64 elem_idx = bit_idx >> 5;
 1311    u64 shift = bit_idx & 31;
 1312    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1313    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 1314}
 1315
 1316// --- fasttest.BVDfltOpt.pmask.qOrBitVal
 1317// Or bit # BIT_IDX in bit set. No bounds checking
 1318inline void fasttest::pmask_qOrBitVal(fasttest::BVDfltOpt& parent, u32 bit_idx, bool val) {
 1319    u64 elem_idx = bit_idx >> 5;
 1320    u64 shift = bit_idx & 31;
 1321    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1322    elem = elem | (u32(val) << shift); // Or in val into elem
 1323}
 1324
 1325// --- fasttest.BVDfltOpt.pmask.ClearBitsAll
 1326// Set all bits of array to zero.
 1327// Note: this does not change what NBits will return.
 1328inline void fasttest::pmask_ClearBitsAll(fasttest::BVDfltOpt& parent) {
 1329    u64 n = pmask_N(parent);
 1330    for (u64 i = 0; i < n; i++) {
 1331        pmask_qFind(parent, i) = 0;
 1332    }
 1333}
 1334
 1335// --- fasttest.BVDfltOpt.pmask.ClearBits
 1336// Zero in PARENT any bits that are set in RHS.
 1337inline void fasttest::pmask_ClearBits(fasttest::BVDfltOpt& parent, fasttest::BVDfltOpt &rhs) {
 1338    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 1339    for (u64 i = 0; i < n; i++) {
 1340        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 1341    }
 1342}
 1343
 1344// --- fasttest.BVDfltOpt.pmask.OrBits
 1345// Set PARENT to union of two bitsets.
 1346// (This function is not named Set.. to avoid triple entendre).
 1347inline void fasttest::pmask_OrBits(fasttest::BVDfltOpt& parent, fasttest::BVDfltOpt &rhs) {
 1348    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 1349    for (u64 i = 0; i < n; i++) {
 1350        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 1351    }
 1352}
 1353
 1354// --- fasttest.BVDfltOpt.pmask.Sup
 1355// Return smallest number N such that indexes of all 1 bits are below N
 1356inline i32 fasttest::pmask_Sup(fasttest::BVDfltOpt& parent) {
 1357    u64 lim = pmask_N(parent);
 1358    i32 ret = 0;
 1359    for (int i = lim-1; i >= 0; i--) {
 1360        u32 &val = pmask_qFind(parent, i);
 1361        if (val) {
 1362            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 1363            ret = i * 32 + bitidx;
 1364            break;
 1365        }
 1366    }
 1367    return ret;
 1368}
 1369
 1370// --- fasttest.BVDfltOpt.Value.PresentQ
 1371// Return true if the field is marked in the presence mask
 1372inline bool fasttest::Value_PresentQ(fasttest::BVDfltOpt& parent) {
 1373    return pmask_qGetBit(parent, 0);
 1374}
 1375
 1376// --- fasttest.BVDfltOpt.Value.SetPresent
 1377// Set presence bit for this field in the pmask
 1378inline void fasttest::Value_SetPresent(fasttest::BVDfltOpt& parent) {
 1379    pmask_qSetBit(parent, 0); // mark presence in pmask
 1380}
 1381
 1382// --- fasttest.BVDfltOpt.Value.Present_GetBit
 1383// Return field's bit number in the pmask
 1384inline int fasttest::Value_Present_GetBit(fasttest::BVDfltOpt& parent) {
 1385    int retval = 0;
 1386    (void)parent;//only to avoid -Wunused-parameter
 1387    return retval;
 1388}
 1389
 1390// --- fasttest.BVDfltOpt.Value.Set
 1391inline void fasttest::Value_Set(fasttest::BVDfltOpt& parent, const algo::strptr& rhs) {
 1392    parent.Value = rhs;
 1393    pmask_qSetBit(parent, 0); // mark presence in pmask
 1394}
 1395
 1396// --- fasttest.BVDfltOpt.pmask_bitcurs.Reset
 1397inline void fasttest::BVDfltOpt_pmask_bitcurs_Reset(BVDfltOpt_pmask_bitcurs &curs, fasttest::BVDfltOpt &parent) {
 1398    curs.elems = &pmask_qFind(parent,0);
 1399    curs.n_elems = pmask_N(parent);
 1400    curs.bit = -1;
 1401    BVDfltOpt_pmask_bitcurs_Next(curs);
 1402}
 1403
 1404// --- fasttest.BVDfltOpt.pmask_bitcurs.ValidQ
 1405// cursor points to valid item
 1406inline bool fasttest::BVDfltOpt_pmask_bitcurs_ValidQ(BVDfltOpt_pmask_bitcurs &curs) {
 1407    return curs.bit < curs.n_elems*32;
 1408}
 1409
 1410// --- fasttest.BVDfltOpt.pmask_bitcurs.Access
 1411// item access
 1412inline int& fasttest::BVDfltOpt_pmask_bitcurs_Access(BVDfltOpt_pmask_bitcurs &curs) {
 1413    return curs.bit;
 1414}
 1415
 1416// --- fasttest.BVDfltOpt..GetMsgLength
 1417// Message length (uses length field)
 1418inline i32 fasttest::GetMsgLength(const fasttest::BVDfltOpt& parent) {
 1419    return i32(const_cast<fasttest::BVDfltOpt&>(parent).length);
 1420}
 1421
 1422// --- fasttest.BVDfltOpt..GetMsgMemptr
 1423// Memptr encompassing the message (uses length field)
 1424inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVDfltOpt& row) {
 1425    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVDfltOpt&>(row).length));
 1426}
 1427
 1428// --- fasttest.BVDfltOpt..Init
 1429// Set all fields to initial values.
 1430inline void fasttest::BVDfltOpt_Init(fasttest::BVDfltOpt& parent) {
 1431    parent.length = u32(ssizeof(parent) + (0));
 1432    parent.id = u32(43);
 1433    parent.pmask = u32(0);
 1434    parent.Value = algo::strptr("B43");
 1435}
 1436inline fasttest::BVNone::BVNone() {
 1437    fasttest::BVNone_Init(*this);
 1438}
 1439
 1440
 1441// --- fasttest.BVNone.base.Castdown
 1442// Check if fasttest::TemplateHeader is an instance of BVNone by checking the type field
 1443// If it is, return the pointer of target type.
 1444// Additionally, check if the length field permits valid instance of BVNone.
 1445// If not successful, quietly return NULL.
 1446inline fasttest::BVNone* fasttest::BVNone_Castdown(fasttest::TemplateHeader &hdr) {
 1447    bool cond = hdr.id == (7);
 1448    cond &= i32(hdr.length) >= ssizeof(fasttest::BVNone);
 1449    return cond ? reinterpret_cast<fasttest::BVNone*>(&hdr) : NULL;
 1450}
 1451
 1452// --- fasttest.BVNone.base.Castbase
 1453inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVNone& parent) {
 1454    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 1455}
 1456
 1457// --- fasttest.BVNone..GetMsgLength
 1458// Message length (uses length field)
 1459inline i32 fasttest::GetMsgLength(const fasttest::BVNone& parent) {
 1460    return i32(const_cast<fasttest::BVNone&>(parent).length);
 1461}
 1462
 1463// --- fasttest.BVNone..GetMsgMemptr
 1464// Memptr encompassing the message (uses length field)
 1465inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVNone& row) {
 1466    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVNone&>(row).length));
 1467}
 1468
 1469// --- fasttest.BVNone..Init
 1470// Set all fields to initial values.
 1471inline void fasttest::BVNone_Init(fasttest::BVNone& parent) {
 1472    parent.length = u32(ssizeof(parent) + (0));
 1473    parent.id = u32(7);
 1474}
 1475inline fasttest::BVNoneOpt::BVNoneOpt() {
 1476    fasttest::BVNoneOpt_Init(*this);
 1477}
 1478
 1479
 1480// --- fasttest.BVNoneOpt.base.Castdown
 1481// Check if fasttest::TemplateHeader is an instance of BVNoneOpt by checking the type field
 1482// If it is, return the pointer of target type.
 1483// Additionally, check if the length field permits valid instance of BVNoneOpt.
 1484// If not successful, quietly return NULL.
 1485inline fasttest::BVNoneOpt* fasttest::BVNoneOpt_Castdown(fasttest::TemplateHeader &hdr) {
 1486    bool cond = hdr.id == (8);
 1487    cond &= i32(hdr.length) >= ssizeof(fasttest::BVNoneOpt);
 1488    return cond ? reinterpret_cast<fasttest::BVNoneOpt*>(&hdr) : NULL;
 1489}
 1490
 1491// --- fasttest.BVNoneOpt.base.Castbase
 1492inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::BVNoneOpt& parent) {
 1493    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 1494}
 1495
 1496// --- fasttest.BVNoneOpt.pmask.N
 1497// Return constant 1
 1498inline int fasttest::pmask_N(fasttest::BVNoneOpt& parent) {
 1499    (void)parent;
 1500    return 1;
 1501}
 1502
 1503// --- fasttest.BVNoneOpt.pmask.qFind
 1504// Access value
 1505inline u32& fasttest::pmask_qFind(fasttest::BVNoneOpt& parent, int) {
 1506    return parent.pmask;
 1507}
 1508
 1509// --- fasttest.BVNoneOpt.pmask.NBits
 1510// Get max # of bits in the bitset
 1511// Return max. number of bits supported by array
 1512inline int fasttest::pmask_Nbits(fasttest::BVNoneOpt& parent) {
 1513    return pmask_N(parent) * 32;
 1514}
 1515
 1516// --- fasttest.BVNoneOpt.pmask.qGetBit
 1517// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 1518inline bool fasttest::pmask_qGetBit(fasttest::BVNoneOpt& parent, u32 bit_idx) {
 1519    u64 elem_idx = bit_idx >> 5;
 1520    u64 shift = bit_idx & 31;
 1521    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 1522    return bool((elem >> shift) & 1); // extract bit
 1523}
 1524
 1525// --- fasttest.BVNoneOpt.pmask.GetBit
 1526// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 1527inline bool fasttest::pmask_GetBit(fasttest::BVNoneOpt& parent, u32 bit_idx) {
 1528    u64 elem_idx = bit_idx >> 5;
 1529    u64 shift = bit_idx & 31;
 1530    bool ret = false;
 1531    u64 lim = pmask_N(parent);
 1532    if (elem_idx < lim) {
 1533        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 1534        ret = (elem >> shift) & 1;                 // extract bit
 1535    }
 1536    return ret;
 1537}
 1538
 1539// --- fasttest.BVNoneOpt.pmask.BitsEmptyQ
 1540// Check if all the bits in the bitset are equal to zero
 1541inline bool fasttest::pmask_BitsEmptyQ(fasttest::BVNoneOpt& parent) {
 1542    bool retval = true;
 1543    u64 n = pmask_N(parent);
 1544    for (u64 i = 0; i < n; i++) {
 1545        if (pmask_qFind(parent,i) != 0) {
 1546            retval = false;
 1547            break;
 1548        }
 1549    }
 1550    return retval;
 1551}
 1552
 1553// --- fasttest.BVNoneOpt.pmask.Sum1s
 1554inline u64 fasttest::pmask_Sum1s(fasttest::BVNoneOpt& parent) {
 1555    u64 sum = 0;
 1556    u64 n = pmask_N(parent);
 1557    for (u64 i = 0; i < n; i++) {
 1558        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 1559    }
 1560    return sum;
 1561}
 1562
 1563// --- fasttest.BVNoneOpt.pmask.qClearBit
 1564// Clear bit # BIT_IDX in bit set. No bounds checking
 1565inline void fasttest::pmask_qClearBit(fasttest::BVNoneOpt& parent, u32 bit_idx) {
 1566    u64 elem_idx = bit_idx >> 5;
 1567    u64 shift = bit_idx & 31;
 1568    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1569    elem = elem & ~(u32(1) << shift); // clear bit
 1570}
 1571
 1572// --- fasttest.BVNoneOpt.pmask.ClearBit
 1573// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 1574inline void fasttest::pmask_ClearBit(fasttest::BVNoneOpt& parent, u32 bit_idx) {
 1575    u64 elem_idx = bit_idx >> 5;
 1576    u64 shift = bit_idx & 31;
 1577    u64 lim = pmask_N(parent);
 1578    if (elem_idx < lim) {
 1579        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1580        elem = elem & ~(u32(1) << shift); // clear bit
 1581    }
 1582}
 1583
 1584// --- fasttest.BVNoneOpt.pmask.qSetBit
 1585// Set bit # BIT_IDX in bit set. No bounds checking
 1586inline void fasttest::pmask_qSetBit(fasttest::BVNoneOpt& parent, u32 bit_idx) {
 1587    u64 elem_idx = bit_idx >> 5;
 1588    u64 shift = bit_idx & 31;
 1589    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1590    elem = elem | (u32(1) << shift); // set bit
 1591}
 1592
 1593// --- fasttest.BVNoneOpt.pmask.SetBit
 1594// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 1595inline void fasttest::pmask_SetBit(fasttest::BVNoneOpt& parent, u32 bit_idx) {
 1596    u64 elem_idx = bit_idx >> 5;
 1597    u64 shift = bit_idx & 31;
 1598    u64 lim = pmask_N(parent);
 1599    if (elem_idx < lim) {
 1600        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1601        elem = elem | (u32(1) << shift); // set bit
 1602    }
 1603}
 1604
 1605// --- fasttest.BVNoneOpt.pmask.qSetBitVal
 1606// Set bit # BIT_IDX in bit set. No bounds checking
 1607inline void fasttest::pmask_qSetBitVal(fasttest::BVNoneOpt& parent, u32 bit_idx, bool val) {
 1608    u64 elem_idx = bit_idx >> 5;
 1609    u64 shift = bit_idx & 31;
 1610    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1611    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 1612}
 1613
 1614// --- fasttest.BVNoneOpt.pmask.qOrBitVal
 1615// Or bit # BIT_IDX in bit set. No bounds checking
 1616inline void fasttest::pmask_qOrBitVal(fasttest::BVNoneOpt& parent, u32 bit_idx, bool val) {
 1617    u64 elem_idx = bit_idx >> 5;
 1618    u64 shift = bit_idx & 31;
 1619    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 1620    elem = elem | (u32(val) << shift); // Or in val into elem
 1621}
 1622
 1623// --- fasttest.BVNoneOpt.pmask.ClearBitsAll
 1624// Set all bits of array to zero.
 1625// Note: this does not change what NBits will return.
 1626inline void fasttest::pmask_ClearBitsAll(fasttest::BVNoneOpt& parent) {
 1627    u64 n = pmask_N(parent);
 1628    for (u64 i = 0; i < n; i++) {
 1629        pmask_qFind(parent, i) = 0;
 1630    }
 1631}
 1632
 1633// --- fasttest.BVNoneOpt.pmask.ClearBits
 1634// Zero in PARENT any bits that are set in RHS.
 1635inline void fasttest::pmask_ClearBits(fasttest::BVNoneOpt& parent, fasttest::BVNoneOpt &rhs) {
 1636    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 1637    for (u64 i = 0; i < n; i++) {
 1638        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 1639    }
 1640}
 1641
 1642// --- fasttest.BVNoneOpt.pmask.OrBits
 1643// Set PARENT to union of two bitsets.
 1644// (This function is not named Set.. to avoid triple entendre).
 1645inline void fasttest::pmask_OrBits(fasttest::BVNoneOpt& parent, fasttest::BVNoneOpt &rhs) {
 1646    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 1647    for (u64 i = 0; i < n; i++) {
 1648        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 1649    }
 1650}
 1651
 1652// --- fasttest.BVNoneOpt.pmask.Sup
 1653// Return smallest number N such that indexes of all 1 bits are below N
 1654inline i32 fasttest::pmask_Sup(fasttest::BVNoneOpt& parent) {
 1655    u64 lim = pmask_N(parent);
 1656    i32 ret = 0;
 1657    for (int i = lim-1; i >= 0; i--) {
 1658        u32 &val = pmask_qFind(parent, i);
 1659        if (val) {
 1660            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 1661            ret = i * 32 + bitidx;
 1662            break;
 1663        }
 1664    }
 1665    return ret;
 1666}
 1667
 1668// --- fasttest.BVNoneOpt.Value.PresentQ
 1669// Return true if the field is marked in the presence mask
 1670inline bool fasttest::Value_PresentQ(fasttest::BVNoneOpt& parent) {
 1671    return pmask_qGetBit(parent, 0);
 1672}
 1673
 1674// --- fasttest.BVNoneOpt.Value.SetPresent
 1675// Set presence bit for this field in the pmask
 1676inline void fasttest::Value_SetPresent(fasttest::BVNoneOpt& parent) {
 1677    pmask_qSetBit(parent, 0); // mark presence in pmask
 1678}
 1679
 1680// --- fasttest.BVNoneOpt.Value.Present_GetBit
 1681// Return field's bit number in the pmask
 1682inline int fasttest::Value_Present_GetBit(fasttest::BVNoneOpt& parent) {
 1683    int retval = 0;
 1684    (void)parent;//only to avoid -Wunused-parameter
 1685    return retval;
 1686}
 1687
 1688// --- fasttest.BVNoneOpt.Value.Set
 1689inline void fasttest::Value_Set(fasttest::BVNoneOpt& parent, const algo::strptr& rhs) {
 1690    parent.Value = rhs;
 1691    pmask_qSetBit(parent, 0); // mark presence in pmask
 1692}
 1693
 1694// --- fasttest.BVNoneOpt.pmask_bitcurs.Reset
 1695inline void fasttest::BVNoneOpt_pmask_bitcurs_Reset(BVNoneOpt_pmask_bitcurs &curs, fasttest::BVNoneOpt &parent) {
 1696    curs.elems = &pmask_qFind(parent,0);
 1697    curs.n_elems = pmask_N(parent);
 1698    curs.bit = -1;
 1699    BVNoneOpt_pmask_bitcurs_Next(curs);
 1700}
 1701
 1702// --- fasttest.BVNoneOpt.pmask_bitcurs.ValidQ
 1703// cursor points to valid item
 1704inline bool fasttest::BVNoneOpt_pmask_bitcurs_ValidQ(BVNoneOpt_pmask_bitcurs &curs) {
 1705    return curs.bit < curs.n_elems*32;
 1706}
 1707
 1708// --- fasttest.BVNoneOpt.pmask_bitcurs.Access
 1709// item access
 1710inline int& fasttest::BVNoneOpt_pmask_bitcurs_Access(BVNoneOpt_pmask_bitcurs &curs) {
 1711    return curs.bit;
 1712}
 1713
 1714// --- fasttest.BVNoneOpt..GetMsgLength
 1715// Message length (uses length field)
 1716inline i32 fasttest::GetMsgLength(const fasttest::BVNoneOpt& parent) {
 1717    return i32(const_cast<fasttest::BVNoneOpt&>(parent).length);
 1718}
 1719
 1720// --- fasttest.BVNoneOpt..GetMsgMemptr
 1721// Memptr encompassing the message (uses length field)
 1722inline algo::memptr fasttest::GetMsgMemptr(const fasttest::BVNoneOpt& row) {
 1723    return algo::memptr((u8*)&row, i32(const_cast<fasttest::BVNoneOpt&>(row).length));
 1724}
 1725
 1726// --- fasttest.BVNoneOpt..Init
 1727// Set all fields to initial values.
 1728inline void fasttest::BVNoneOpt_Init(fasttest::BVNoneOpt& parent) {
 1729    parent.length = u32(ssizeof(parent) + (0));
 1730    parent.id = u32(8);
 1731    parent.pmask = u32(0);
 1732}
 1733inline fasttest::SampleEnum::SampleEnum(u32                            in_value)
 1734    : value(in_value)
 1735{
 1736}
 1737inline fasttest::SampleEnum::SampleEnum(fasttest_SampleEnumEnum arg) { this->value = u32(arg); }
 1738inline fasttest::SampleEnum::SampleEnum() {
 1739    fasttest::SampleEnum_Init(*this);
 1740}
 1741
 1742
 1743// --- fasttest.SampleEnum.value.GetEnum
 1744// Get value of field as enum type
 1745inline fasttest_SampleEnumEnum fasttest::value_GetEnum(const fasttest::SampleEnum& parent) {
 1746    return fasttest_SampleEnumEnum(parent.value);
 1747}
 1748
 1749// --- fasttest.SampleEnum.value.SetEnum
 1750// Set value of field from enum type.
 1751inline void fasttest::value_SetEnum(fasttest::SampleEnum& parent, fasttest_SampleEnumEnum rhs) {
 1752    parent.value = u32(rhs);
 1753}
 1754
 1755// --- fasttest.SampleEnum.value.Cast
 1756inline fasttest::SampleEnum::operator fasttest_SampleEnumEnum () const {
 1757    return fasttest_SampleEnumEnum((*this).value);
 1758}
 1759
 1760// --- fasttest.SampleEnum..Init
 1761// Set all fields to initial values.
 1762inline void fasttest::SampleEnum_Init(fasttest::SampleEnum& parent) {
 1763    parent.value = u32(0);
 1764}
 1765inline fasttest::SampleSet::SampleSet(u32                            in_value)
 1766    : value(in_value)
 1767{
 1768}
 1769inline fasttest::SampleSet::SampleSet(fasttest_SampleSet_value_Enum arg) { this->value = u32(arg); }
 1770inline fasttest::SampleSet::SampleSet() {
 1771    fasttest::SampleSet_Init(*this);
 1772}
 1773
 1774
 1775// --- fasttest.SampleSet.prima.Get
 1776// Retrieve bitfield from value of field value
 1777//    1 bits starting at bit 0.
 1778inline bool fasttest::prima_Get(const fasttest::SampleSet& parent) {
 1779    return bool((parent.value >> 0) & 0x01);
 1780}
 1781
 1782// --- fasttest.SampleSet.prima.Set
 1783// Set bitfield in value of field 'value'
 1784//    1 bits starting at bit 0.
 1785inline void fasttest::prima_Set(fasttest::SampleSet& parent, bool rhs) {
 1786    u32 t1    = u32(0x01) << 0;
 1787    u32 t2    = (u32(rhs) & 0x01) << 0;
 1788    parent.value = u32((parent.value & ~t1) | t2);
 1789}
 1790
 1791// --- fasttest.SampleSet.secunda.Get
 1792// Retrieve bitfield from value of field value
 1793//    1 bits starting at bit 1.
 1794inline bool fasttest::secunda_Get(const fasttest::SampleSet& parent) {
 1795    return bool((parent.value >> 1) & 0x01);
 1796}
 1797
 1798// --- fasttest.SampleSet.secunda.Set
 1799// Set bitfield in value of field 'value'
 1800//    1 bits starting at bit 1.
 1801inline void fasttest::secunda_Set(fasttest::SampleSet& parent, bool rhs) {
 1802    u32 t1    = u32(0x01) << 1;
 1803    u32 t2    = (u32(rhs) & 0x01) << 1;
 1804    parent.value = u32((parent.value & ~t1) | t2);
 1805}
 1806
 1807// --- fasttest.SampleSet.tertia.Get
 1808// Retrieve bitfield from value of field value
 1809//    1 bits starting at bit 2.
 1810inline bool fasttest::tertia_Get(const fasttest::SampleSet& parent) {
 1811    return bool((parent.value >> 2) & 0x01);
 1812}
 1813
 1814// --- fasttest.SampleSet.tertia.Set
 1815// Set bitfield in value of field 'value'
 1816//    1 bits starting at bit 2.
 1817inline void fasttest::tertia_Set(fasttest::SampleSet& parent, bool rhs) {
 1818    u32 t1    = u32(0x01) << 2;
 1819    u32 t2    = (u32(rhs) & 0x01) << 2;
 1820    parent.value = u32((parent.value & ~t1) | t2);
 1821}
 1822
 1823// --- fasttest.SampleSet..Init
 1824// Set all fields to initial values.
 1825inline void fasttest::SampleSet_Init(fasttest::SampleSet& parent) {
 1826    parent.value = u32(0);
 1827}
 1828inline fasttest::FastState::FastState() {
 1829    fasttest::FastState_Init(*this);
 1830}
 1831
 1832
 1833// --- fasttest.FastState.assigned.N
 1834// Return constant 1
 1835inline int fasttest::assigned_N(fasttest::FastState& parent) {
 1836    (void)parent;
 1837    return 1;
 1838}
 1839
 1840// --- fasttest.FastState.assigned.qFind
 1841// Access value
 1842inline u64& fasttest::assigned_qFind(fasttest::FastState& parent, int) {
 1843    return parent.assigned;
 1844}
 1845
 1846// --- fasttest.FastState.assigned.NBits
 1847// Get max # of bits in the bitset
 1848// Return max. number of bits supported by array
 1849inline int fasttest::assigned_Nbits(fasttest::FastState& parent) {
 1850    return assigned_N(parent) * 64;
 1851}
 1852
 1853// --- fasttest.FastState.assigned.qGetBit
 1854// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 1855inline bool fasttest::assigned_qGetBit(fasttest::FastState& parent, u32 bit_idx) {
 1856    u64 elem_idx = bit_idx >> 6;
 1857    u64 shift = bit_idx & 63;
 1858    u64 &elem = assigned_qFind(parent, elem_idx); // fetch element
 1859    return bool((elem >> shift) & 1); // extract bit
 1860}
 1861
 1862// --- fasttest.FastState.assigned.GetBit
 1863// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 1864inline bool fasttest::assigned_GetBit(fasttest::FastState& parent, u32 bit_idx) {
 1865    u64 elem_idx = bit_idx >> 6;
 1866    u64 shift = bit_idx & 63;
 1867    bool ret = false;
 1868    u64 lim = assigned_N(parent);
 1869    if (elem_idx < lim) {
 1870        u64 &elem = assigned_qFind(parent, elem_idx); // fetch element
 1871        ret = (elem >> shift) & 1;                 // extract bit
 1872    }
 1873    return ret;
 1874}
 1875
 1876// --- fasttest.FastState.assigned.BitsEmptyQ
 1877// Check if all the bits in the bitset are equal to zero
 1878inline bool fasttest::assigned_BitsEmptyQ(fasttest::FastState& parent) {
 1879    bool retval = true;
 1880    u64 n = assigned_N(parent);
 1881    for (u64 i = 0; i < n; i++) {
 1882        if (assigned_qFind(parent,i) != 0) {
 1883            retval = false;
 1884            break;
 1885        }
 1886    }
 1887    return retval;
 1888}
 1889
 1890// --- fasttest.FastState.assigned.Sum1s
 1891inline u64 fasttest::assigned_Sum1s(fasttest::FastState& parent) {
 1892    u64 sum = 0;
 1893    u64 n = assigned_N(parent);
 1894    for (u64 i = 0; i < n; i++) {
 1895        sum += algo::u64_Count1s(assigned_qFind(parent, i));
 1896    }
 1897    return sum;
 1898}
 1899
 1900// --- fasttest.FastState.assigned.qClearBit
 1901// Clear bit # BIT_IDX in bit set. No bounds checking
 1902inline void fasttest::assigned_qClearBit(fasttest::FastState& parent, u32 bit_idx) {
 1903    u64 elem_idx = bit_idx >> 6;
 1904    u64 shift = bit_idx & 63;
 1905    u64 &elem = assigned_qFind(parent, elem_idx); // fetch
 1906    elem = elem & ~(u64(1) << shift); // clear bit
 1907}
 1908
 1909// --- fasttest.FastState.assigned.ClearBit
 1910// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 1911inline void fasttest::assigned_ClearBit(fasttest::FastState& parent, u32 bit_idx) {
 1912    u64 elem_idx = bit_idx >> 6;
 1913    u64 shift = bit_idx & 63;
 1914    u64 lim = assigned_N(parent);
 1915    if (elem_idx < lim) {
 1916        u64 &elem = assigned_qFind(parent, elem_idx); // fetch
 1917        elem = elem & ~(u64(1) << shift); // clear bit
 1918    }
 1919}
 1920
 1921// --- fasttest.FastState.assigned.qSetBit
 1922// Set bit # BIT_IDX in bit set. No bounds checking
 1923inline void fasttest::assigned_qSetBit(fasttest::FastState& parent, u32 bit_idx) {
 1924    u64 elem_idx = bit_idx >> 6;
 1925    u64 shift = bit_idx & 63;
 1926    u64 &elem = assigned_qFind(parent, elem_idx); // fetch
 1927    elem = elem | (u64(1) << shift); // set bit
 1928}
 1929
 1930// --- fasttest.FastState.assigned.SetBit
 1931// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 1932inline void fasttest::assigned_SetBit(fasttest::FastState& parent, u32 bit_idx) {
 1933    u64 elem_idx = bit_idx >> 6;
 1934    u64 shift = bit_idx & 63;
 1935    u64 lim = assigned_N(parent);
 1936    if (elem_idx < lim) {
 1937        u64 &elem = assigned_qFind(parent, elem_idx); // fetch
 1938        elem = elem | (u64(1) << shift); // set bit
 1939    }
 1940}
 1941
 1942// --- fasttest.FastState.assigned.qSetBitVal
 1943// Set bit # BIT_IDX in bit set. No bounds checking
 1944inline void fasttest::assigned_qSetBitVal(fasttest::FastState& parent, u32 bit_idx, bool val) {
 1945    u64 elem_idx = bit_idx >> 6;
 1946    u64 shift = bit_idx & 63;
 1947    u64 &elem = assigned_qFind(parent, elem_idx); // fetch
 1948    elem = (elem & ~(u64(1) << shift)) | (u64(val) << shift); // insert new value
 1949}
 1950
 1951// --- fasttest.FastState.assigned.qOrBitVal
 1952// Or bit # BIT_IDX in bit set. No bounds checking
 1953inline void fasttest::assigned_qOrBitVal(fasttest::FastState& parent, u32 bit_idx, bool val) {
 1954    u64 elem_idx = bit_idx >> 6;
 1955    u64 shift = bit_idx & 63;
 1956    u64 &elem = assigned_qFind(parent, elem_idx); // fetch
 1957    elem = elem | (u64(val) << shift); // Or in val into elem
 1958}
 1959
 1960// --- fasttest.FastState.assigned.ClearBitsAll
 1961// Set all bits of array to zero.
 1962// Note: this does not change what NBits will return.
 1963inline void fasttest::assigned_ClearBitsAll(fasttest::FastState& parent) {
 1964    u64 n = assigned_N(parent);
 1965    for (u64 i = 0; i < n; i++) {
 1966        assigned_qFind(parent, i) = 0;
 1967    }
 1968}
 1969
 1970// --- fasttest.FastState.assigned.ClearBits
 1971// Zero in PARENT any bits that are set in RHS.
 1972inline void fasttest::assigned_ClearBits(fasttest::FastState& parent, fasttest::FastState &rhs) {
 1973    u64 n = u64_Min(assigned_N(parent), assigned_N(rhs));
 1974    for (u64 i = 0; i < n; i++) {
 1975        assigned_qFind(parent, i) &= ~assigned_qFind(rhs, i);
 1976    }
 1977}
 1978
 1979// --- fasttest.FastState.assigned.OrBits
 1980// Set PARENT to union of two bitsets.
 1981// (This function is not named Set.. to avoid triple entendre).
 1982inline void fasttest::assigned_OrBits(fasttest::FastState& parent, fasttest::FastState &rhs) {
 1983    u64 n = u64_Min(assigned_N(parent), assigned_N(rhs));
 1984    for (u64 i = 0; i < n; i++) {
 1985        assigned_qFind(parent, i) |= assigned_qFind(rhs, i);
 1986    }
 1987}
 1988
 1989// --- fasttest.FastState.assigned.Sup
 1990// Return smallest number N such that indexes of all 1 bits are below N
 1991inline i32 fasttest::assigned_Sup(fasttest::FastState& parent) {
 1992    u64 lim = assigned_N(parent);
 1993    i32 ret = 0;
 1994    for (int i = lim-1; i >= 0; i--) {
 1995        u64 &val = assigned_qFind(parent, i);
 1996        if (val) {
 1997            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 1998            ret = i * 64 + bitidx;
 1999            break;
 2000        }
 2001    }
 2002    return ret;
 2003}
 2004
 2005// --- fasttest.FastState.present.N
 2006// Return constant 1
 2007inline int fasttest::present_N(fasttest::FastState& parent) {
 2008    (void)parent;
 2009    return 1;
 2010}
 2011
 2012// --- fasttest.FastState.present.qFind
 2013// Access value
 2014inline u32& fasttest::present_qFind(fasttest::FastState& parent, int) {
 2015    return parent.present;
 2016}
 2017
 2018// --- fasttest.FastState.present.NBits
 2019// Get max # of bits in the bitset
 2020// Return max. number of bits supported by array
 2021inline int fasttest::present_Nbits(fasttest::FastState& parent) {
 2022    return present_N(parent) * 32;
 2023}
 2024
 2025// --- fasttest.FastState.present.qGetBit
 2026// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 2027inline bool fasttest::present_qGetBit(fasttest::FastState& parent, u32 bit_idx) {
 2028    u64 elem_idx = bit_idx >> 5;
 2029    u64 shift = bit_idx & 31;
 2030    u32 &elem = present_qFind(parent, elem_idx); // fetch element
 2031    return bool((elem >> shift) & 1); // extract bit
 2032}
 2033
 2034// --- fasttest.FastState.present.GetBit
 2035// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 2036inline bool fasttest::present_GetBit(fasttest::FastState& parent, u32 bit_idx) {
 2037    u64 elem_idx = bit_idx >> 5;
 2038    u64 shift = bit_idx & 31;
 2039    bool ret = false;
 2040    u64 lim = present_N(parent);
 2041    if (elem_idx < lim) {
 2042        u32 &elem = present_qFind(parent, elem_idx); // fetch element
 2043        ret = (elem >> shift) & 1;                 // extract bit
 2044    }
 2045    return ret;
 2046}
 2047
 2048// --- fasttest.FastState.present.BitsEmptyQ
 2049// Check if all the bits in the bitset are equal to zero
 2050inline bool fasttest::present_BitsEmptyQ(fasttest::FastState& parent) {
 2051    bool retval = true;
 2052    u64 n = present_N(parent);
 2053    for (u64 i = 0; i < n; i++) {
 2054        if (present_qFind(parent,i) != 0) {
 2055            retval = false;
 2056            break;
 2057        }
 2058    }
 2059    return retval;
 2060}
 2061
 2062// --- fasttest.FastState.present.Sum1s
 2063inline u64 fasttest::present_Sum1s(fasttest::FastState& parent) {
 2064    u64 sum = 0;
 2065    u64 n = present_N(parent);
 2066    for (u64 i = 0; i < n; i++) {
 2067        sum += algo::u32_Count1s(present_qFind(parent, i));
 2068    }
 2069    return sum;
 2070}
 2071
 2072// --- fasttest.FastState.present.qClearBit
 2073// Clear bit # BIT_IDX in bit set. No bounds checking
 2074inline void fasttest::present_qClearBit(fasttest::FastState& parent, u32 bit_idx) {
 2075    u64 elem_idx = bit_idx >> 5;
 2076    u64 shift = bit_idx & 31;
 2077    u32 &elem = present_qFind(parent, elem_idx); // fetch
 2078    elem = elem & ~(u32(1) << shift); // clear bit
 2079}
 2080
 2081// --- fasttest.FastState.present.ClearBit
 2082// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 2083inline void fasttest::present_ClearBit(fasttest::FastState& parent, u32 bit_idx) {
 2084    u64 elem_idx = bit_idx >> 5;
 2085    u64 shift = bit_idx & 31;
 2086    u64 lim = present_N(parent);
 2087    if (elem_idx < lim) {
 2088        u32 &elem = present_qFind(parent, elem_idx); // fetch
 2089        elem = elem & ~(u32(1) << shift); // clear bit
 2090    }
 2091}
 2092
 2093// --- fasttest.FastState.present.qSetBit
 2094// Set bit # BIT_IDX in bit set. No bounds checking
 2095inline void fasttest::present_qSetBit(fasttest::FastState& parent, u32 bit_idx) {
 2096    u64 elem_idx = bit_idx >> 5;
 2097    u64 shift = bit_idx & 31;
 2098    u32 &elem = present_qFind(parent, elem_idx); // fetch
 2099    elem = elem | (u32(1) << shift); // set bit
 2100}
 2101
 2102// --- fasttest.FastState.present.SetBit
 2103// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 2104inline void fasttest::present_SetBit(fasttest::FastState& parent, u32 bit_idx) {
 2105    u64 elem_idx = bit_idx >> 5;
 2106    u64 shift = bit_idx & 31;
 2107    u64 lim = present_N(parent);
 2108    if (elem_idx < lim) {
 2109        u32 &elem = present_qFind(parent, elem_idx); // fetch
 2110        elem = elem | (u32(1) << shift); // set bit
 2111    }
 2112}
 2113
 2114// --- fasttest.FastState.present.qSetBitVal
 2115// Set bit # BIT_IDX in bit set. No bounds checking
 2116inline void fasttest::present_qSetBitVal(fasttest::FastState& parent, u32 bit_idx, bool val) {
 2117    u64 elem_idx = bit_idx >> 5;
 2118    u64 shift = bit_idx & 31;
 2119    u32 &elem = present_qFind(parent, elem_idx); // fetch
 2120    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 2121}
 2122
 2123// --- fasttest.FastState.present.qOrBitVal
 2124// Or bit # BIT_IDX in bit set. No bounds checking
 2125inline void fasttest::present_qOrBitVal(fasttest::FastState& parent, u32 bit_idx, bool val) {
 2126    u64 elem_idx = bit_idx >> 5;
 2127    u64 shift = bit_idx & 31;
 2128    u32 &elem = present_qFind(parent, elem_idx); // fetch
 2129    elem = elem | (u32(val) << shift); // Or in val into elem
 2130}
 2131
 2132// --- fasttest.FastState.present.ClearBitsAll
 2133// Set all bits of array to zero.
 2134// Note: this does not change what NBits will return.
 2135inline void fasttest::present_ClearBitsAll(fasttest::FastState& parent) {
 2136    u64 n = present_N(parent);
 2137    for (u64 i = 0; i < n; i++) {
 2138        present_qFind(parent, i) = 0;
 2139    }
 2140}
 2141
 2142// --- fasttest.FastState.present.ClearBits
 2143// Zero in PARENT any bits that are set in RHS.
 2144inline void fasttest::present_ClearBits(fasttest::FastState& parent, fasttest::FastState &rhs) {
 2145    u64 n = u64_Min(present_N(parent), present_N(rhs));
 2146    for (u64 i = 0; i < n; i++) {
 2147        present_qFind(parent, i) &= ~present_qFind(rhs, i);
 2148    }
 2149}
 2150
 2151// --- fasttest.FastState.present.OrBits
 2152// Set PARENT to union of two bitsets.
 2153// (This function is not named Set.. to avoid triple entendre).
 2154inline void fasttest::present_OrBits(fasttest::FastState& parent, fasttest::FastState &rhs) {
 2155    u64 n = u64_Min(present_N(parent), present_N(rhs));
 2156    for (u64 i = 0; i < n; i++) {
 2157        present_qFind(parent, i) |= present_qFind(rhs, i);
 2158    }
 2159}
 2160
 2161// --- fasttest.FastState.present.Sup
 2162// Return smallest number N such that indexes of all 1 bits are below N
 2163inline i32 fasttest::present_Sup(fasttest::FastState& parent) {
 2164    u64 lim = present_N(parent);
 2165    i32 ret = 0;
 2166    for (int i = lim-1; i >= 0; i--) {
 2167        u32 &val = present_qFind(parent, i);
 2168        if (val) {
 2169            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 2170            ret = i * 32 + bitidx;
 2171            break;
 2172        }
 2173    }
 2174    return ret;
 2175}
 2176
 2177// --- fasttest.FastState.tid.AssignedQ
 2178// Return true if the field is marked in the presence mask
 2179inline bool fasttest::tid_AssignedQ(fasttest::FastState& parent) {
 2180    return assigned_qGetBit(parent, 37);
 2181}
 2182
 2183// --- fasttest.FastState.tid.SetAssigned
 2184// Set presence bit for this field in the pmask
 2185inline void fasttest::tid_SetAssigned(fasttest::FastState& parent) {
 2186    assigned_qSetBit(parent, 37); // mark presence in pmask
 2187}
 2188
 2189// --- fasttest.FastState.tid.Assigned_GetBit
 2190// Return field's bit number in the pmask
 2191inline int fasttest::tid_Assigned_GetBit(fasttest::FastState& parent) {
 2192    int retval = 37;
 2193    (void)parent;//only to avoid -Wunused-parameter
 2194    return retval;
 2195}
 2196
 2197// --- fasttest.FastState.tid.Set
 2198inline void fasttest::tid_Set(fasttest::FastState& parent, u32 rhs) {
 2199    parent.tid = rhs;
 2200    assigned_qSetBit(parent, 37); // mark presence in pmask
 2201}
 2202
 2203// --- fasttest.FastState.Value49.AssignedQ
 2204// Return true if the field is marked in the presence mask
 2205inline bool fasttest::Value49_AssignedQ(fasttest::FastState& parent) {
 2206    return assigned_qGetBit(parent, 7);
 2207}
 2208
 2209// --- fasttest.FastState.Value49.SetAssigned
 2210// Set presence bit for this field in the pmask
 2211inline void fasttest::Value49_SetAssigned(fasttest::FastState& parent) {
 2212    assigned_qSetBit(parent, 7); // mark presence in pmask
 2213}
 2214
 2215// --- fasttest.FastState.Value49.Assigned_GetBit
 2216// Return field's bit number in the pmask
 2217inline int fasttest::Value49_Assigned_GetBit(fasttest::FastState& parent) {
 2218    int retval = 7;
 2219    (void)parent;//only to avoid -Wunused-parameter
 2220    return retval;
 2221}
 2222
 2223// --- fasttest.FastState.Value49.Set
 2224inline void fasttest::Value49_Set(fasttest::FastState& parent, i32 rhs) {
 2225    parent.Value49 = rhs;
 2226    assigned_qSetBit(parent, 7); // mark presence in pmask
 2227}
 2228
 2229// --- fasttest.FastState.Value50.AssignedQ
 2230// Return true if the field is marked in the presence mask
 2231inline bool fasttest::Value50_AssignedQ(fasttest::FastState& parent) {
 2232    return assigned_qGetBit(parent, 8);
 2233}
 2234
 2235// --- fasttest.FastState.Value50.PresentQ
 2236// Return true if the field is marked in the presence mask
 2237inline bool fasttest::Value50_PresentQ(fasttest::FastState& parent) {
 2238    return present_qGetBit(parent, 3);
 2239}
 2240
 2241// --- fasttest.FastState.Value50.SetAssigned
 2242// Set presence bit for this field in the pmask
 2243inline void fasttest::Value50_SetAssigned(fasttest::FastState& parent) {
 2244    assigned_qSetBit(parent, 8); // mark presence in pmask
 2245}
 2246
 2247// --- fasttest.FastState.Value50.SetPresent
 2248// Set presence bit for this field in the pmask
 2249inline void fasttest::Value50_SetPresent(fasttest::FastState& parent) {
 2250    present_qSetBit(parent, 3); // mark presence in pmask
 2251}
 2252
 2253// --- fasttest.FastState.Value50.Assigned_GetBit
 2254// Return field's bit number in the pmask
 2255inline int fasttest::Value50_Assigned_GetBit(fasttest::FastState& parent) {
 2256    int retval = 8;
 2257    (void)parent;//only to avoid -Wunused-parameter
 2258    return retval;
 2259}
 2260
 2261// --- fasttest.FastState.Value50.Present_GetBit
 2262// Return field's bit number in the pmask
 2263inline int fasttest::Value50_Present_GetBit(fasttest::FastState& parent) {
 2264    int retval = 3;
 2265    (void)parent;//only to avoid -Wunused-parameter
 2266    return retval;
 2267}
 2268
 2269// --- fasttest.FastState.Value50.Set
 2270inline void fasttest::Value50_Set(fasttest::FastState& parent, i32 rhs) {
 2271    parent.Value50 = rhs;
 2272    assigned_qSetBit(parent, 8); // mark presence in pmask
 2273    present_qSetBit(parent, 3); // mark presence in pmask
 2274}
 2275
 2276// --- fasttest.FastState.Value51.AssignedQ
 2277// Return true if the field is marked in the presence mask
 2278inline bool fasttest::Value51_AssignedQ(fasttest::FastState& parent) {
 2279    return assigned_qGetBit(parent, 9);
 2280}
 2281
 2282// --- fasttest.FastState.Value51.PresentQ
 2283// Return true if the field is marked in the presence mask
 2284inline bool fasttest::Value51_PresentQ(fasttest::FastState& parent) {
 2285    return present_qGetBit(parent, 4);
 2286}
 2287
 2288// --- fasttest.FastState.Value51.SetAssigned
 2289// Set presence bit for this field in the pmask
 2290inline void fasttest::Value51_SetAssigned(fasttest::FastState& parent) {
 2291    assigned_qSetBit(parent, 9); // mark presence in pmask
 2292}
 2293
 2294// --- fasttest.FastState.Value51.SetPresent
 2295// Set presence bit for this field in the pmask
 2296inline void fasttest::Value51_SetPresent(fasttest::FastState& parent) {
 2297    present_qSetBit(parent, 4); // mark presence in pmask
 2298}
 2299
 2300// --- fasttest.FastState.Value51.Assigned_GetBit
 2301// Return field's bit number in the pmask
 2302inline int fasttest::Value51_Assigned_GetBit(fasttest::FastState& parent) {
 2303    int retval = 9;
 2304    (void)parent;//only to avoid -Wunused-parameter
 2305    return retval;
 2306}
 2307
 2308// --- fasttest.FastState.Value51.Present_GetBit
 2309// Return field's bit number in the pmask
 2310inline int fasttest::Value51_Present_GetBit(fasttest::FastState& parent) {
 2311    int retval = 4;
 2312    (void)parent;//only to avoid -Wunused-parameter
 2313    return retval;
 2314}
 2315
 2316// --- fasttest.FastState.Value51.Set
 2317inline void fasttest::Value51_Set(fasttest::FastState& parent, i32 rhs) {
 2318    parent.Value51 = rhs;
 2319    assigned_qSetBit(parent, 9); // mark presence in pmask
 2320    present_qSetBit(parent, 4); // mark presence in pmask
 2321}
 2322
 2323// --- fasttest.FastState.Value52.AssignedQ
 2324// Return true if the field is marked in the presence mask
 2325inline bool fasttest::Value52_AssignedQ(fasttest::FastState& parent) {
 2326    return assigned_qGetBit(parent, 10);
 2327}
 2328
 2329// --- fasttest.FastState.Value52.SetAssigned
 2330// Set presence bit for this field in the pmask
 2331inline void fasttest::Value52_SetAssigned(fasttest::FastState& parent) {
 2332    assigned_qSetBit(parent, 10); // mark presence in pmask
 2333}
 2334
 2335// --- fasttest.FastState.Value52.Assigned_GetBit
 2336// Return field's bit number in the pmask
 2337inline int fasttest::Value52_Assigned_GetBit(fasttest::FastState& parent) {
 2338    int retval = 10;
 2339    (void)parent;//only to avoid -Wunused-parameter
 2340    return retval;
 2341}
 2342
 2343// --- fasttest.FastState.Value52.Set
 2344inline void fasttest::Value52_Set(fasttest::FastState& parent, u32 rhs) {
 2345    parent.Value52 = rhs;
 2346    assigned_qSetBit(parent, 10); // mark presence in pmask
 2347}
 2348
 2349// --- fasttest.FastState.Value53.AssignedQ
 2350// Return true if the field is marked in the presence mask
 2351inline bool fasttest::Value53_AssignedQ(fasttest::FastState& parent) {
 2352    return assigned_qGetBit(parent, 11);
 2353}
 2354
 2355// --- fasttest.FastState.Value53.PresentQ
 2356// Return true if the field is marked in the presence mask
 2357inline bool fasttest::Value53_PresentQ(fasttest::FastState& parent) {
 2358    return present_qGetBit(parent, 5);
 2359}
 2360
 2361// --- fasttest.FastState.Value53.SetAssigned
 2362// Set presence bit for this field in the pmask
 2363inline void fasttest::Value53_SetAssigned(fasttest::FastState& parent) {
 2364    assigned_qSetBit(parent, 11); // mark presence in pmask
 2365}
 2366
 2367// --- fasttest.FastState.Value53.SetPresent
 2368// Set presence bit for this field in the pmask
 2369inline void fasttest::Value53_SetPresent(fasttest::FastState& parent) {
 2370    present_qSetBit(parent, 5); // mark presence in pmask
 2371}
 2372
 2373// --- fasttest.FastState.Value53.Assigned_GetBit
 2374// Return field's bit number in the pmask
 2375inline int fasttest::Value53_Assigned_GetBit(fasttest::FastState& parent) {
 2376    int retval = 11;
 2377    (void)parent;//only to avoid -Wunused-parameter
 2378    return retval;
 2379}
 2380
 2381// --- fasttest.FastState.Value53.Present_GetBit
 2382// Return field's bit number in the pmask
 2383inline int fasttest::Value53_Present_GetBit(fasttest::FastState& parent) {
 2384    int retval = 5;
 2385    (void)parent;//only to avoid -Wunused-parameter
 2386    return retval;
 2387}
 2388
 2389// --- fasttest.FastState.Value53.Set
 2390inline void fasttest::Value53_Set(fasttest::FastState& parent, u32 rhs) {
 2391    parent.Value53 = rhs;
 2392    assigned_qSetBit(parent, 11); // mark presence in pmask
 2393    present_qSetBit(parent, 5); // mark presence in pmask
 2394}
 2395
 2396// --- fasttest.FastState.Value54.AssignedQ
 2397// Return true if the field is marked in the presence mask
 2398inline bool fasttest::Value54_AssignedQ(fasttest::FastState& parent) {
 2399    return assigned_qGetBit(parent, 12);
 2400}
 2401
 2402// --- fasttest.FastState.Value54.PresentQ
 2403// Return true if the field is marked in the presence mask
 2404inline bool fasttest::Value54_PresentQ(fasttest::FastState& parent) {
 2405    return present_qGetBit(parent, 6);
 2406}
 2407
 2408// --- fasttest.FastState.Value54.SetAssigned
 2409// Set presence bit for this field in the pmask
 2410inline void fasttest::Value54_SetAssigned(fasttest::FastState& parent) {
 2411    assigned_qSetBit(parent, 12); // mark presence in pmask
 2412}
 2413
 2414// --- fasttest.FastState.Value54.SetPresent
 2415// Set presence bit for this field in the pmask
 2416inline void fasttest::Value54_SetPresent(fasttest::FastState& parent) {
 2417    present_qSetBit(parent, 6); // mark presence in pmask
 2418}
 2419
 2420// --- fasttest.FastState.Value54.Assigned_GetBit
 2421// Return field's bit number in the pmask
 2422inline int fasttest::Value54_Assigned_GetBit(fasttest::FastState& parent) {
 2423    int retval = 12;
 2424    (void)parent;//only to avoid -Wunused-parameter
 2425    return retval;
 2426}
 2427
 2428// --- fasttest.FastState.Value54.Present_GetBit
 2429// Return field's bit number in the pmask
 2430inline int fasttest::Value54_Present_GetBit(fasttest::FastState& parent) {
 2431    int retval = 6;
 2432    (void)parent;//only to avoid -Wunused-parameter
 2433    return retval;
 2434}
 2435
 2436// --- fasttest.FastState.Value54.Set
 2437inline void fasttest::Value54_Set(fasttest::FastState& parent, u32 rhs) {
 2438    parent.Value54 = rhs;
 2439    assigned_qSetBit(parent, 12); // mark presence in pmask
 2440    present_qSetBit(parent, 6); // mark presence in pmask
 2441}
 2442
 2443// --- fasttest.FastState.Value55.AssignedQ
 2444// Return true if the field is marked in the presence mask
 2445inline bool fasttest::Value55_AssignedQ(fasttest::FastState& parent) {
 2446    return assigned_qGetBit(parent, 13);
 2447}
 2448
 2449// --- fasttest.FastState.Value55.SetAssigned
 2450// Set presence bit for this field in the pmask
 2451inline void fasttest::Value55_SetAssigned(fasttest::FastState& parent) {
 2452    assigned_qSetBit(parent, 13); // mark presence in pmask
 2453}
 2454
 2455// --- fasttest.FastState.Value55.Assigned_GetBit
 2456// Return field's bit number in the pmask
 2457inline int fasttest::Value55_Assigned_GetBit(fasttest::FastState& parent) {
 2458    int retval = 13;
 2459    (void)parent;//only to avoid -Wunused-parameter
 2460    return retval;
 2461}
 2462
 2463// --- fasttest.FastState.Value55.Set
 2464inline void fasttest::Value55_Set(fasttest::FastState& parent, const algo::strptr& rhs) {
 2465    parent.Value55 = rhs;
 2466    assigned_qSetBit(parent, 13); // mark presence in pmask
 2467}
 2468
 2469// --- fasttest.FastState.Value56.AssignedQ
 2470// Return true if the field is marked in the presence mask
 2471inline bool fasttest::Value56_AssignedQ(fasttest::FastState& parent) {
 2472    return assigned_qGetBit(parent, 14);
 2473}
 2474
 2475// --- fasttest.FastState.Value56.PresentQ
 2476// Return true if the field is marked in the presence mask
 2477inline bool fasttest::Value56_PresentQ(fasttest::FastState& parent) {
 2478    return present_qGetBit(parent, 7);
 2479}
 2480
 2481// --- fasttest.FastState.Value56.SetAssigned
 2482// Set presence bit for this field in the pmask
 2483inline void fasttest::Value56_SetAssigned(fasttest::FastState& parent) {
 2484    assigned_qSetBit(parent, 14); // mark presence in pmask
 2485}
 2486
 2487// --- fasttest.FastState.Value56.SetPresent
 2488// Set presence bit for this field in the pmask
 2489inline void fasttest::Value56_SetPresent(fasttest::FastState& parent) {
 2490    present_qSetBit(parent, 7); // mark presence in pmask
 2491}
 2492
 2493// --- fasttest.FastState.Value56.Assigned_GetBit
 2494// Return field's bit number in the pmask
 2495inline int fasttest::Value56_Assigned_GetBit(fasttest::FastState& parent) {
 2496    int retval = 14;
 2497    (void)parent;//only to avoid -Wunused-parameter
 2498    return retval;
 2499}
 2500
 2501// --- fasttest.FastState.Value56.Present_GetBit
 2502// Return field's bit number in the pmask
 2503inline int fasttest::Value56_Present_GetBit(fasttest::FastState& parent) {
 2504    int retval = 7;
 2505    (void)parent;//only to avoid -Wunused-parameter
 2506    return retval;
 2507}
 2508
 2509// --- fasttest.FastState.Value56.Set
 2510inline void fasttest::Value56_Set(fasttest::FastState& parent, const algo::strptr& rhs) {
 2511    parent.Value56 = rhs;
 2512    assigned_qSetBit(parent, 14); // mark presence in pmask
 2513    present_qSetBit(parent, 7); // mark presence in pmask
 2514}
 2515
 2516// --- fasttest.FastState.Value57.AssignedQ
 2517// Return true if the field is marked in the presence mask
 2518inline bool fasttest::Value57_AssignedQ(fasttest::FastState& parent) {
 2519    return assigned_qGetBit(parent, 15);
 2520}
 2521
 2522// --- fasttest.FastState.Value57.PresentQ
 2523// Return true if the field is marked in the presence mask
 2524inline bool fasttest::Value57_PresentQ(fasttest::FastState& parent) {
 2525    return present_qGetBit(parent, 8);
 2526}
 2527
 2528// --- fasttest.FastState.Value57.SetAssigned
 2529// Set presence bit for this field in the pmask
 2530inline void fasttest::Value57_SetAssigned(fasttest::FastState& parent) {
 2531    assigned_qSetBit(parent, 15); // mark presence in pmask
 2532}
 2533
 2534// --- fasttest.FastState.Value57.SetPresent
 2535// Set presence bit for this field in the pmask
 2536inline void fasttest::Value57_SetPresent(fasttest::FastState& parent) {
 2537    present_qSetBit(parent, 8); // mark presence in pmask
 2538}
 2539
 2540// --- fasttest.FastState.Value57.Assigned_GetBit
 2541// Return field's bit number in the pmask
 2542inline int fasttest::Value57_Assigned_GetBit(fasttest::FastState& parent) {
 2543    int retval = 15;
 2544    (void)parent;//only to avoid -Wunused-parameter
 2545    return retval;
 2546}
 2547
 2548// --- fasttest.FastState.Value57.Present_GetBit
 2549// Return field's bit number in the pmask
 2550inline int fasttest::Value57_Present_GetBit(fasttest::FastState& parent) {
 2551    int retval = 8;
 2552    (void)parent;//only to avoid -Wunused-parameter
 2553    return retval;
 2554}
 2555
 2556// --- fasttest.FastState.Value57.Set
 2557inline void fasttest::Value57_Set(fasttest::FastState& parent, const algo::strptr& rhs) {
 2558    parent.Value57 = rhs;
 2559    assigned_qSetBit(parent, 15); // mark presence in pmask
 2560    present_qSetBit(parent, 8); // mark presence in pmask
 2561}
 2562
 2563// --- fasttest.FastState.Value58.AssignedQ
 2564// Return true if the field is marked in the presence mask
 2565inline bool fasttest::Value58_AssignedQ(fasttest::FastState& parent) {
 2566    return assigned_qGetBit(parent, 16);
 2567}
 2568
 2569// --- fasttest.FastState.Value58.SetAssigned
 2570// Set presence bit for this field in the pmask
 2571inline void fasttest::Value58_SetAssigned(fasttest::FastState& parent) {
 2572    assigned_qSetBit(parent, 16); // mark presence in pmask
 2573}
 2574
 2575// --- fasttest.FastState.Value58.Assigned_GetBit
 2576// Return field's bit number in the pmask
 2577inline int fasttest::Value58_Assigned_GetBit(fasttest::FastState& parent) {
 2578    int retval = 16;
 2579    (void)parent;//only to avoid -Wunused-parameter
 2580    return retval;
 2581}
 2582
 2583// --- fasttest.FastState.Value58.Set
 2584inline void fasttest::Value58_Set(fasttest::FastState& parent, const algo::strptr& rhs) {
 2585    parent.Value58 = rhs;
 2586    assigned_qSetBit(parent, 16); // mark presence in pmask
 2587}
 2588
 2589// --- fasttest.FastState.Value59.AssignedQ
 2590// Return true if the field is marked in the presence mask
 2591inline bool fasttest::Value59_AssignedQ(fasttest::FastState& parent) {
 2592    return assigned_qGetBit(parent, 17);
 2593}
 2594
 2595// --- fasttest.FastState.Value59.PresentQ
 2596// Return true if the field is marked in the presence mask
 2597inline bool fasttest::Value59_PresentQ(fasttest::FastState& parent) {
 2598    return present_qGetBit(parent, 9);
 2599}
 2600
 2601// --- fasttest.FastState.Value59.SetAssigned
 2602// Set presence bit for this field in the pmask
 2603inline void fasttest::Value59_SetAssigned(fasttest::FastState& parent) {
 2604    assigned_qSetBit(parent, 17); // mark presence in pmask
 2605}
 2606
 2607// --- fasttest.FastState.Value59.SetPresent
 2608// Set presence bit for this field in the pmask
 2609inline void fasttest::Value59_SetPresent(fasttest::FastState& parent) {
 2610    present_qSetBit(parent, 9); // mark presence in pmask
 2611}
 2612
 2613// --- fasttest.FastState.Value59.Assigned_GetBit
 2614// Return field's bit number in the pmask
 2615inline int fasttest::Value59_Assigned_GetBit(fasttest::FastState& parent) {
 2616    int retval = 17;
 2617    (void)parent;//only to avoid -Wunused-parameter
 2618    return retval;
 2619}
 2620
 2621// --- fasttest.FastState.Value59.Present_GetBit
 2622// Return field's bit number in the pmask
 2623inline int fasttest::Value59_Present_GetBit(fasttest::FastState& parent) {
 2624    int retval = 9;
 2625    (void)parent;//only to avoid -Wunused-parameter
 2626    return retval;
 2627}
 2628
 2629// --- fasttest.FastState.Value59.Set
 2630inline void fasttest::Value59_Set(fasttest::FastState& parent, const algo::strptr& rhs) {
 2631    parent.Value59 = rhs;
 2632    assigned_qSetBit(parent, 17); // mark presence in pmask
 2633    present_qSetBit(parent, 9); // mark presence in pmask
 2634}
 2635
 2636// --- fasttest.FastState.Value60.AssignedQ
 2637// Return true if the field is marked in the presence mask
 2638inline bool fasttest::Value60_AssignedQ(fasttest::FastState& parent) {
 2639    return assigned_qGetBit(parent, 18);
 2640}
 2641
 2642// --- fasttest.FastState.Value60.PresentQ
 2643// Return true if the field is marked in the presence mask
 2644inline bool fasttest::Value60_PresentQ(fasttest::FastState& parent) {
 2645    return present_qGetBit(parent, 10);
 2646}
 2647
 2648// --- fasttest.FastState.Value60.SetAssigned
 2649// Set presence bit for this field in the pmask
 2650inline void fasttest::Value60_SetAssigned(fasttest::FastState& parent) {
 2651    assigned_qSetBit(parent, 18); // mark presence in pmask
 2652}
 2653
 2654// --- fasttest.FastState.Value60.SetPresent
 2655// Set presence bit for this field in the pmask
 2656inline void fasttest::Value60_SetPresent(fasttest::FastState& parent) {
 2657    present_qSetBit(parent, 10); // mark presence in pmask
 2658}
 2659
 2660// --- fasttest.FastState.Value60.Assigned_GetBit
 2661// Return field's bit number in the pmask
 2662inline int fasttest::Value60_Assigned_GetBit(fasttest::FastState& parent) {
 2663    int retval = 18;
 2664    (void)parent;//only to avoid -Wunused-parameter
 2665    return retval;
 2666}
 2667
 2668// --- fasttest.FastState.Value60.Present_GetBit
 2669// Return field's bit number in the pmask
 2670inline int fasttest::Value60_Present_GetBit(fasttest::FastState& parent) {
 2671    int retval = 10;
 2672    (void)parent;//only to avoid -Wunused-parameter
 2673    return retval;
 2674}
 2675
 2676// --- fasttest.FastState.Value60.Set
 2677inline void fasttest::Value60_Set(fasttest::FastState& parent, const algo::strptr& rhs) {
 2678    parent.Value60 = rhs;
 2679    assigned_qSetBit(parent, 18); // mark presence in pmask
 2680    present_qSetBit(parent, 10); // mark presence in pmask
 2681}
 2682
 2683// --- fasttest.FastState.Value61.AssignedQ
 2684// Return true if the field is marked in the presence mask
 2685inline bool fasttest::Value61_AssignedQ(fasttest::FastState& parent) {
 2686    return assigned_qGetBit(parent, 19);
 2687}
 2688
 2689// --- fasttest.FastState.Value61.SetAssigned
 2690// Set presence bit for this field in the pmask
 2691inline void fasttest::Value61_SetAssigned(fasttest::FastState& parent) {
 2692    assigned_qSetBit(parent, 19); // mark presence in pmask
 2693}
 2694
 2695// --- fasttest.FastState.Value61.Assigned_GetBit
 2696// Return field's bit number in the pmask
 2697inline int fasttest::Value61_Assigned_GetBit(fasttest::FastState& parent) {
 2698    int retval = 19;
 2699    (void)parent;//only to avoid -Wunused-parameter
 2700    return retval;
 2701}
 2702
 2703// --- fasttest.FastState.Value61.Set
 2704inline void fasttest::Value61_Set(fasttest::FastState& parent, algo::Decimal rhs) {
 2705    parent.Value61 = rhs;
 2706    assigned_qSetBit(parent, 19); // mark presence in pmask
 2707}
 2708
 2709// --- fasttest.FastState.Value62.AssignedQ
 2710// Return true if the field is marked in the presence mask
 2711inline bool fasttest::Value62_AssignedQ(fasttest::FastState& parent) {
 2712    return assigned_qGetBit(parent, 20);
 2713}
 2714
 2715// --- fasttest.FastState.Value62.PresentQ
 2716// Return true if the field is marked in the presence mask
 2717inline bool fasttest::Value62_PresentQ(fasttest::FastState& parent) {
 2718    return present_qGetBit(parent, 11);
 2719}
 2720
 2721// --- fasttest.FastState.Value62.SetAssigned
 2722// Set presence bit for this field in the pmask
 2723inline void fasttest::Value62_SetAssigned(fasttest::FastState& parent) {
 2724    assigned_qSetBit(parent, 20); // mark presence in pmask
 2725}
 2726
 2727// --- fasttest.FastState.Value62.SetPresent
 2728// Set presence bit for this field in the pmask
 2729inline void fasttest::Value62_SetPresent(fasttest::FastState& parent) {
 2730    present_qSetBit(parent, 11); // mark presence in pmask
 2731}
 2732
 2733// --- fasttest.FastState.Value62.Assigned_GetBit
 2734// Return field's bit number in the pmask
 2735inline int fasttest::Value62_Assigned_GetBit(fasttest::FastState& parent) {
 2736    int retval = 20;
 2737    (void)parent;//only to avoid -Wunused-parameter
 2738    return retval;
 2739}
 2740
 2741// --- fasttest.FastState.Value62.Present_GetBit
 2742// Return field's bit number in the pmask
 2743inline int fasttest::Value62_Present_GetBit(fasttest::FastState& parent) {
 2744    int retval = 11;
 2745    (void)parent;//only to avoid -Wunused-parameter
 2746    return retval;
 2747}
 2748
 2749// --- fasttest.FastState.Value62.Set
 2750inline void fasttest::Value62_Set(fasttest::FastState& parent, algo::Decimal rhs) {
 2751    parent.Value62 = rhs;
 2752    assigned_qSetBit(parent, 20); // mark presence in pmask
 2753    present_qSetBit(parent, 11); // mark presence in pmask
 2754}
 2755
 2756// --- fasttest.FastState.Value63.AssignedQ
 2757// Return true if the field is marked in the presence mask
 2758inline bool fasttest::Value63_AssignedQ(fasttest::FastState& parent) {
 2759    return assigned_qGetBit(parent, 21);
 2760}
 2761
 2762// --- fasttest.FastState.Value63.PresentQ
 2763// Return true if the field is marked in the presence mask
 2764inline bool fasttest::Value63_PresentQ(fasttest::FastState& parent) {
 2765    return present_qGetBit(parent, 12);
 2766}
 2767
 2768// --- fasttest.FastState.Value63.SetAssigned
 2769// Set presence bit for this field in the pmask
 2770inline void fasttest::Value63_SetAssigned(fasttest::FastState& parent) {
 2771    assigned_qSetBit(parent, 21); // mark presence in pmask
 2772}
 2773
 2774// --- fasttest.FastState.Value63.SetPresent
 2775// Set presence bit for this field in the pmask
 2776inline void fasttest::Value63_SetPresent(fasttest::FastState& parent) {
 2777    present_qSetBit(parent, 12); // mark presence in pmask
 2778}
 2779
 2780// --- fasttest.FastState.Value63.Assigned_GetBit
 2781// Return field's bit number in the pmask
 2782inline int fasttest::Value63_Assigned_GetBit(fasttest::FastState& parent) {
 2783    int retval = 21;
 2784    (void)parent;//only to avoid -Wunused-parameter
 2785    return retval;
 2786}
 2787
 2788// --- fasttest.FastState.Value63.Present_GetBit
 2789// Return field's bit number in the pmask
 2790inline int fasttest::Value63_Present_GetBit(fasttest::FastState& parent) {
 2791    int retval = 12;
 2792    (void)parent;//only to avoid -Wunused-parameter
 2793    return retval;
 2794}
 2795
 2796// --- fasttest.FastState.Value63.Set
 2797inline void fasttest::Value63_Set(fasttest::FastState& parent, algo::Decimal rhs) {
 2798    parent.Value63 = rhs;
 2799    assigned_qSetBit(parent, 21); // mark presence in pmask
 2800    present_qSetBit(parent, 12); // mark presence in pmask
 2801}
 2802
 2803// --- fasttest.FastState.Value65.AssignedQ
 2804// Return true if the field is marked in the presence mask
 2805inline bool fasttest::Value65_AssignedQ(fasttest::FastState& parent) {
 2806    return assigned_qGetBit(parent, 22);
 2807}
 2808
 2809// --- fasttest.FastState.Value65.SetAssigned
 2810// Set presence bit for this field in the pmask
 2811inline void fasttest::Value65_SetAssigned(fasttest::FastState& parent) {
 2812    assigned_qSetBit(parent, 22); // mark presence in pmask
 2813}
 2814
 2815// --- fasttest.FastState.Value65.Assigned_GetBit
 2816// Return field's bit number in the pmask
 2817inline int fasttest::Value65_Assigned_GetBit(fasttest::FastState& parent) {
 2818    int retval = 22;
 2819    (void)parent;//only to avoid -Wunused-parameter
 2820    return retval;
 2821}
 2822
 2823// --- fasttest.FastState.Value65.Set
 2824inline void fasttest::Value65_Set(fasttest::FastState& parent, i32 rhs) {
 2825    parent.Value65 = rhs;
 2826    assigned_qSetBit(parent, 22); // mark presence in pmask
 2827}
 2828
 2829// --- fasttest.FastState.Value66.AssignedQ
 2830// Return true if the field is marked in the presence mask
 2831inline bool fasttest::Value66_AssignedQ(fasttest::FastState& parent) {
 2832    return assigned_qGetBit(parent, 23);
 2833}
 2834
 2835// --- fasttest.FastState.Value66.SetAssigned
 2836// Set presence bit for this field in the pmask
 2837inline void fasttest::Value66_SetAssigned(fasttest::FastState& parent) {
 2838    assigned_qSetBit(parent, 23); // mark presence in pmask
 2839}
 2840
 2841// --- fasttest.FastState.Value66.Assigned_GetBit
 2842// Return field's bit number in the pmask
 2843inline int fasttest::Value66_Assigned_GetBit(fasttest::FastState& parent) {
 2844    int retval = 23;
 2845    (void)parent;//only to avoid -Wunused-parameter
 2846    return retval;
 2847}
 2848
 2849// --- fasttest.FastState.Value66.Set
 2850inline void fasttest::Value66_Set(fasttest::FastState& parent, i32 rhs) {
 2851    parent.Value66 = rhs;
 2852    assigned_qSetBit(parent, 23); // mark presence in pmask
 2853}
 2854
 2855// --- fasttest.FastState.Value67.AssignedQ
 2856// Return true if the field is marked in the presence mask
 2857inline bool fasttest::Value67_AssignedQ(fasttest::FastState& parent) {
 2858    return assigned_qGetBit(parent, 24);
 2859}
 2860
 2861// --- fasttest.FastState.Value67.PresentQ
 2862// Return true if the field is marked in the presence mask
 2863inline bool fasttest::Value67_PresentQ(fasttest::FastState& parent) {
 2864    return present_qGetBit(parent, 13);
 2865}
 2866
 2867// --- fasttest.FastState.Value67.SetAssigned
 2868// Set presence bit for this field in the pmask
 2869inline void fasttest::Value67_SetAssigned(fasttest::FastState& parent) {
 2870    assigned_qSetBit(parent, 24); // mark presence in pmask
 2871}
 2872
 2873// --- fasttest.FastState.Value67.SetPresent
 2874// Set presence bit for this field in the pmask
 2875inline void fasttest::Value67_SetPresent(fasttest::FastState& parent) {
 2876    present_qSetBit(parent, 13); // mark presence in pmask
 2877}
 2878
 2879// --- fasttest.FastState.Value67.Assigned_GetBit
 2880// Return field's bit number in the pmask
 2881inline int fasttest::Value67_Assigned_GetBit(fasttest::FastState& parent) {
 2882    int retval = 24;
 2883    (void)parent;//only to avoid -Wunused-parameter
 2884    return retval;
 2885}
 2886
 2887// --- fasttest.FastState.Value67.Present_GetBit
 2888// Return field's bit number in the pmask
 2889inline int fasttest::Value67_Present_GetBit(fasttest::FastState& parent) {
 2890    int retval = 13;
 2891    (void)parent;//only to avoid -Wunused-parameter
 2892    return retval;
 2893}
 2894
 2895// --- fasttest.FastState.Value67.Set
 2896inline void fasttest::Value67_Set(fasttest::FastState& parent, i32 rhs) {
 2897    parent.Value67 = rhs;
 2898    assigned_qSetBit(parent, 24); // mark presence in pmask
 2899    present_qSetBit(parent, 13); // mark presence in pmask
 2900}
 2901
 2902// --- fasttest.FastState.Value68.AssignedQ
 2903// Return true if the field is marked in the presence mask
 2904inline bool fasttest::Value68_AssignedQ(fasttest::FastState& parent) {
 2905    return assigned_qGetBit(parent, 25);
 2906}
 2907
 2908// --- fasttest.FastState.Value68.PresentQ
 2909// Return true if the field is marked in the presence mask
 2910inline bool fasttest::Value68_PresentQ(fasttest::FastState& parent) {
 2911    return present_qGetBit(parent, 14);
 2912}
 2913
 2914// --- fasttest.FastState.Value68.SetAssigned
 2915// Set presence bit for this field in the pmask
 2916inline void fasttest::Value68_SetAssigned(fasttest::FastState& parent) {
 2917    assigned_qSetBit(parent, 25); // mark presence in pmask
 2918}
 2919
 2920// --- fasttest.FastState.Value68.SetPresent
 2921// Set presence bit for this field in the pmask
 2922inline void fasttest::Value68_SetPresent(fasttest::FastState& parent) {
 2923    present_qSetBit(parent, 14); // mark presence in pmask
 2924}
 2925
 2926// --- fasttest.FastState.Value68.Assigned_GetBit
 2927// Return field's bit number in the pmask
 2928inline int fasttest::Value68_Assigned_GetBit(fasttest::FastState& parent) {
 2929    int retval = 25;
 2930    (void)parent;//only to avoid -Wunused-parameter
 2931    return retval;
 2932}
 2933
 2934// --- fasttest.FastState.Value68.Present_GetBit
 2935// Return field's bit number in the pmask
 2936inline int fasttest::Value68_Present_GetBit(fasttest::FastState& parent) {
 2937    int retval = 14;
 2938    (void)parent;//only to avoid -Wunused-parameter
 2939    return retval;
 2940}
 2941
 2942// --- fasttest.FastState.Value68.Set
 2943inline void fasttest::Value68_Set(fasttest::FastState& parent, i32 rhs) {
 2944    parent.Value68 = rhs;
 2945    assigned_qSetBit(parent, 25); // mark presence in pmask
 2946    present_qSetBit(parent, 14); // mark presence in pmask
 2947}
 2948
 2949// --- fasttest.FastState.Value69.AssignedQ
 2950// Return true if the field is marked in the presence mask
 2951inline bool fasttest::Value69_AssignedQ(fasttest::FastState& parent) {
 2952    return assigned_qGetBit(parent, 26);
 2953}
 2954
 2955// --- fasttest.FastState.Value69.SetAssigned
 2956// Set presence bit for this field in the pmask
 2957inline void fasttest::Value69_SetAssigned(fasttest::FastState& parent) {
 2958    assigned_qSetBit(parent, 26); // mark presence in pmask
 2959}
 2960
 2961// --- fasttest.FastState.Value69.Assigned_GetBit
 2962// Return field's bit number in the pmask
 2963inline int fasttest::Value69_Assigned_GetBit(fasttest::FastState& parent) {
 2964    int retval = 26;
 2965    (void)parent;//only to avoid -Wunused-parameter
 2966    return retval;
 2967}
 2968
 2969// --- fasttest.FastState.Value69.Set
 2970inline void fasttest::Value69_Set(fasttest::FastState& parent, u32 rhs) {
 2971    parent.Value69 = rhs;
 2972    assigned_qSetBit(parent, 26); // mark presence in pmask
 2973}
 2974
 2975// --- fasttest.FastState.Value70.AssignedQ
 2976// Return true if the field is marked in the presence mask
 2977inline bool fasttest::Value70_AssignedQ(fasttest::FastState& parent) {
 2978    return assigned_qGetBit(parent, 27);
 2979}
 2980
 2981// --- fasttest.FastState.Value70.SetAssigned
 2982// Set presence bit for this field in the pmask
 2983inline void fasttest::Value70_SetAssigned(fasttest::FastState& parent) {
 2984    assigned_qSetBit(parent, 27); // mark presence in pmask
 2985}
 2986
 2987// --- fasttest.FastState.Value70.Assigned_GetBit
 2988// Return field's bit number in the pmask
 2989inline int fasttest::Value70_Assigned_GetBit(fasttest::FastState& parent) {
 2990    int retval = 27;
 2991    (void)parent;//only to avoid -Wunused-parameter
 2992    return retval;
 2993}
 2994
 2995// --- fasttest.FastState.Value70.Set
 2996inline void fasttest::Value70_Set(fasttest::FastState& parent, u32 rhs) {
 2997    parent.Value70 = rhs;
 2998    assigned_qSetBit(parent, 27); // mark presence in pmask
 2999}
 3000
 3001// --- fasttest.FastState.Value71.AssignedQ
 3002// Return true if the field is marked in the presence mask
 3003inline bool fasttest::Value71_AssignedQ(fasttest::FastState& parent) {
 3004    return assigned_qGetBit(parent, 28);
 3005}
 3006
 3007// --- fasttest.FastState.Value71.PresentQ
 3008// Return true if the field is marked in the presence mask
 3009inline bool fasttest::Value71_PresentQ(fasttest::FastState& parent) {
 3010    return present_qGetBit(parent, 15);
 3011}
 3012
 3013// --- fasttest.FastState.Value71.SetAssigned
 3014// Set presence bit for this field in the pmask
 3015inline void fasttest::Value71_SetAssigned(fasttest::FastState& parent) {
 3016    assigned_qSetBit(parent, 28); // mark presence in pmask
 3017}
 3018
 3019// --- fasttest.FastState.Value71.SetPresent
 3020// Set presence bit for this field in the pmask
 3021inline void fasttest::Value71_SetPresent(fasttest::FastState& parent) {
 3022    present_qSetBit(parent, 15); // mark presence in pmask
 3023}
 3024
 3025// --- fasttest.FastState.Value71.Assigned_GetBit
 3026// Return field's bit number in the pmask
 3027inline int fasttest::Value71_Assigned_GetBit(fasttest::FastState& parent) {
 3028    int retval = 28;
 3029    (void)parent;//only to avoid -Wunused-parameter
 3030    return retval;
 3031}
 3032
 3033// --- fasttest.FastState.Value71.Present_GetBit
 3034// Return field's bit number in the pmask
 3035inline int fasttest::Value71_Present_GetBit(fasttest::FastState& parent) {
 3036    int retval = 15;
 3037    (void)parent;//only to avoid -Wunused-parameter
 3038    return retval;
 3039}
 3040
 3041// --- fasttest.FastState.Value71.Set
 3042inline void fasttest::Value71_Set(fasttest::FastState& parent, u32 rhs) {
 3043    parent.Value71 = rhs;
 3044    assigned_qSetBit(parent, 28); // mark presence in pmask
 3045    present_qSetBit(parent, 15); // mark presence in pmask
 3046}
 3047
 3048// --- fasttest.FastState.Value72.AssignedQ
 3049// Return true if the field is marked in the presence mask
 3050inline bool fasttest::Value72_AssignedQ(fasttest::FastState& parent) {
 3051    return assigned_qGetBit(parent, 29);
 3052}
 3053
 3054// --- fasttest.FastState.Value72.PresentQ
 3055// Return true if the field is marked in the presence mask
 3056inline bool fasttest::Value72_PresentQ(fasttest::FastState& parent) {
 3057    return present_qGetBit(parent, 16);
 3058}
 3059
 3060// --- fasttest.FastState.Value72.SetAssigned
 3061// Set presence bit for this field in the pmask
 3062inline void fasttest::Value72_SetAssigned(fasttest::FastState& parent) {
 3063    assigned_qSetBit(parent, 29); // mark presence in pmask
 3064}
 3065
 3066// --- fasttest.FastState.Value72.SetPresent
 3067// Set presence bit for this field in the pmask
 3068inline void fasttest::Value72_SetPresent(fasttest::FastState& parent) {
 3069    present_qSetBit(parent, 16); // mark presence in pmask
 3070}
 3071
 3072// --- fasttest.FastState.Value72.Assigned_GetBit
 3073// Return field's bit number in the pmask
 3074inline int fasttest::Value72_Assigned_GetBit(fasttest::FastState& parent) {
 3075    int retval = 29;
 3076    (void)parent;//only to avoid -Wunused-parameter
 3077    return retval;
 3078}
 3079
 3080// --- fasttest.FastState.Value72.Present_GetBit
 3081// Return field's bit number in the pmask
 3082inline int fasttest::Value72_Present_GetBit(fasttest::FastState& parent) {
 3083    int retval = 16;
 3084    (void)parent;//only to avoid -Wunused-parameter
 3085    return retval;
 3086}
 3087
 3088// --- fasttest.FastState.Value72.Set
 3089inline void fasttest::Value72_Set(fasttest::FastState& parent, u32 rhs) {
 3090    parent.Value72 = rhs;
 3091    assigned_qSetBit(parent, 29); // mark presence in pmask
 3092    present_qSetBit(parent, 16); // mark presence in pmask
 3093}
 3094
 3095// --- fasttest.FastState.Value81.AssignedQ
 3096// Return true if the field is marked in the presence mask
 3097inline bool fasttest::Value81_AssignedQ(fasttest::FastState& parent) {
 3098    return assigned_qGetBit(parent, 30);
 3099}
 3100
 3101// --- fasttest.FastState.Value81.SetAssigned
 3102// Set presence bit for this field in the pmask
 3103inline void fasttest::Value81_SetAssigned(fasttest::FastState& parent) {
 3104    assigned_qSetBit(parent, 30); // mark presence in pmask
 3105}
 3106
 3107// --- fasttest.FastState.Value81.Assigned_GetBit
 3108// Return field's bit number in the pmask
 3109inline int fasttest::Value81_Assigned_GetBit(fasttest::FastState& parent) {
 3110    int retval = 30;
 3111    (void)parent;//only to avoid -Wunused-parameter
 3112    return retval;
 3113}
 3114
 3115// --- fasttest.FastState.Value81.Set
 3116inline void fasttest::Value81_Set(fasttest::FastState& parent, algo::Decimal rhs) {
 3117    parent.Value81 = rhs;
 3118    assigned_qSetBit(parent, 30); // mark presence in pmask
 3119}
 3120
 3121// --- fasttest.FastState.Value82.AssignedQ
 3122// Return true if the field is marked in the presence mask
 3123inline bool fasttest::Value82_AssignedQ(fasttest::FastState& parent) {
 3124    return assigned_qGetBit(parent, 31);
 3125}
 3126
 3127// --- fasttest.FastState.Value82.SetAssigned
 3128// Set presence bit for this field in the pmask
 3129inline void fasttest::Value82_SetAssigned(fasttest::FastState& parent) {
 3130    assigned_qSetBit(parent, 31); // mark presence in pmask
 3131}
 3132
 3133// --- fasttest.FastState.Value82.Assigned_GetBit
 3134// Return field's bit number in the pmask
 3135inline int fasttest::Value82_Assigned_GetBit(fasttest::FastState& parent) {
 3136    int retval = 31;
 3137    (void)parent;//only to avoid -Wunused-parameter
 3138    return retval;
 3139}
 3140
 3141// --- fasttest.FastState.Value82.Set
 3142inline void fasttest::Value82_Set(fasttest::FastState& parent, algo::Decimal rhs) {
 3143    parent.Value82 = rhs;
 3144    assigned_qSetBit(parent, 31); // mark presence in pmask
 3145}
 3146
 3147// --- fasttest.FastState.Value83.AssignedQ
 3148// Return true if the field is marked in the presence mask
 3149inline bool fasttest::Value83_AssignedQ(fasttest::FastState& parent) {
 3150    return assigned_qGetBit(parent, 32);
 3151}
 3152
 3153// --- fasttest.FastState.Value83.PresentQ
 3154// Return true if the field is marked in the presence mask
 3155inline bool fasttest::Value83_PresentQ(fasttest::FastState& parent) {
 3156    return present_qGetBit(parent, 17);
 3157}
 3158
 3159// --- fasttest.FastState.Value83.SetAssigned
 3160// Set presence bit for this field in the pmask
 3161inline void fasttest::Value83_SetAssigned(fasttest::FastState& parent) {
 3162    assigned_qSetBit(parent, 32); // mark presence in pmask
 3163}
 3164
 3165// --- fasttest.FastState.Value83.SetPresent
 3166// Set presence bit for this field in the pmask
 3167inline void fasttest::Value83_SetPresent(fasttest::FastState& parent) {
 3168    present_qSetBit(parent, 17); // mark presence in pmask
 3169}
 3170
 3171// --- fasttest.FastState.Value83.Assigned_GetBit
 3172// Return field's bit number in the pmask
 3173inline int fasttest::Value83_Assigned_GetBit(fasttest::FastState& parent) {
 3174    int retval = 32;
 3175    (void)parent;//only to avoid -Wunused-parameter
 3176    return retval;
 3177}
 3178
 3179// --- fasttest.FastState.Value83.Present_GetBit
 3180// Return field's bit number in the pmask
 3181inline int fasttest::Value83_Present_GetBit(fasttest::FastState& parent) {
 3182    int retval = 17;
 3183    (void)parent;//only to avoid -Wunused-parameter
 3184    return retval;
 3185}
 3186
 3187// --- fasttest.FastState.Value83.Set
 3188inline void fasttest::Value83_Set(fasttest::FastState& parent, algo::Decimal rhs) {
 3189    parent.Value83 = rhs;
 3190    assigned_qSetBit(parent, 32); // mark presence in pmask
 3191    present_qSetBit(parent, 17); // mark presence in pmask
 3192}
 3193
 3194// --- fasttest.FastState.Value84.AssignedQ
 3195// Return true if the field is marked in the presence mask
 3196inline bool fasttest::Value84_AssignedQ(fasttest::FastState& parent) {
 3197    return assigned_qGetBit(parent, 33);
 3198}
 3199
 3200// --- fasttest.FastState.Value84.PresentQ
 3201// Return true if the field is marked in the presence mask
 3202inline bool fasttest::Value84_PresentQ(fasttest::FastState& parent) {
 3203    return present_qGetBit(parent, 18);
 3204}
 3205
 3206// --- fasttest.FastState.Value84.SetAssigned
 3207// Set presence bit for this field in the pmask
 3208inline void fasttest::Value84_SetAssigned(fasttest::FastState& parent) {
 3209    assigned_qSetBit(parent, 33); // mark presence in pmask
 3210}
 3211
 3212// --- fasttest.FastState.Value84.SetPresent
 3213// Set presence bit for this field in the pmask
 3214inline void fasttest::Value84_SetPresent(fasttest::FastState& parent) {
 3215    present_qSetBit(parent, 18); // mark presence in pmask
 3216}
 3217
 3218// --- fasttest.FastState.Value84.Assigned_GetBit
 3219// Return field's bit number in the pmask
 3220inline int fasttest::Value84_Assigned_GetBit(fasttest::FastState& parent) {
 3221    int retval = 33;
 3222    (void)parent;//only to avoid -Wunused-parameter
 3223    return retval;
 3224}
 3225
 3226// --- fasttest.FastState.Value84.Present_GetBit
 3227// Return field's bit number in the pmask
 3228inline int fasttest::Value84_Present_GetBit(fasttest::FastState& parent) {
 3229    int retval = 18;
 3230    (void)parent;//only to avoid -Wunused-parameter
 3231    return retval;
 3232}
 3233
 3234// --- fasttest.FastState.Value84.Set
 3235inline void fasttest::Value84_Set(fasttest::FastState& parent, algo::Decimal rhs) {
 3236    parent.Value84 = rhs;
 3237    assigned_qSetBit(parent, 33); // mark presence in pmask
 3238    present_qSetBit(parent, 18); // mark presence in pmask
 3239}
 3240
 3241// --- fasttest.FastState.Value97.AssignedQ
 3242// Return true if the field is marked in the presence mask
 3243inline bool fasttest::Value97_AssignedQ(fasttest::FastState& parent) {
 3244    return assigned_qGetBit(parent, 34);
 3245}
 3246
 3247// --- fasttest.FastState.Value97.SetAssigned
 3248// Set presence bit for this field in the pmask
 3249inline void fasttest::Value97_SetAssigned(fasttest::FastState& parent) {
 3250    assigned_qSetBit(parent, 34); // mark presence in pmask
 3251}
 3252
 3253// --- fasttest.FastState.Value97.Assigned_GetBit
 3254// Return field's bit number in the pmask
 3255inline int fasttest::Value97_Assigned_GetBit(fasttest::FastState& parent) {
 3256    int retval = 34;
 3257    (void)parent;//only to avoid -Wunused-parameter
 3258    return retval;
 3259}
 3260
 3261// --- fasttest.FastState.Value97.Set
 3262inline void fasttest::Value97_Set(fasttest::FastState& parent, i32 rhs) {
 3263    parent.Value97 = rhs;
 3264    assigned_qSetBit(parent, 34); // mark presence in pmask
 3265}
 3266
 3267// --- fasttest.FastState.Value98.AssignedQ
 3268// Return true if the field is marked in the presence mask
 3269inline bool fasttest::Value98_AssignedQ(fasttest::FastState& parent) {
 3270    return assigned_qGetBit(parent, 35);
 3271}
 3272
 3273// --- fasttest.FastState.Value98.SetAssigned
 3274// Set presence bit for this field in the pmask
 3275inline void fasttest::Value98_SetAssigned(fasttest::FastState& parent) {
 3276    assigned_qSetBit(parent, 35); // mark presence in pmask
 3277}
 3278
 3279// --- fasttest.FastState.Value98.Assigned_GetBit
 3280// Return field's bit number in the pmask
 3281inline int fasttest::Value98_Assigned_GetBit(fasttest::FastState& parent) {
 3282    int retval = 35;
 3283    (void)parent;//only to avoid -Wunused-parameter
 3284    return retval;
 3285}
 3286
 3287// --- fasttest.FastState.Value98.Set
 3288inline void fasttest::Value98_Set(fasttest::FastState& parent, i32 rhs) {
 3289    parent.Value98 = rhs;
 3290    assigned_qSetBit(parent, 35); // mark presence in pmask
 3291}
 3292
 3293// --- fasttest.FastState.Value99.AssignedQ
 3294// Return true if the field is marked in the presence mask
 3295inline bool fasttest::Value99_AssignedQ(fasttest::FastState& parent) {
 3296    return assigned_qGetBit(parent, 36);
 3297}
 3298
 3299// --- fasttest.FastState.Value99.PresentQ
 3300// Return true if the field is marked in the presence mask
 3301inline bool fasttest::Value99_PresentQ(fasttest::FastState& parent) {
 3302    return present_qGetBit(parent, 19);
 3303}
 3304
 3305// --- fasttest.FastState.Value99.SetAssigned
 3306// Set presence bit for this field in the pmask
 3307inline void fasttest::Value99_SetAssigned(fasttest::FastState& parent) {
 3308    assigned_qSetBit(parent, 36); // mark presence in pmask
 3309}
 3310
 3311// --- fasttest.FastState.Value99.SetPresent
 3312// Set presence bit for this field in the pmask
 3313inline void fasttest::Value99_SetPresent(fasttest::FastState& parent) {
 3314    present_qSetBit(parent, 19); // mark presence in pmask
 3315}
 3316
 3317// --- fasttest.FastState.Value99.Assigned_GetBit
 3318// Return field's bit number in the pmask
 3319inline int fasttest::Value99_Assigned_GetBit(fasttest::FastState& parent) {
 3320    int retval = 36;
 3321    (void)parent;//only to avoid -Wunused-parameter
 3322    return retval;
 3323}
 3324
 3325// --- fasttest.FastState.Value99.Present_GetBit
 3326// Return field's bit number in the pmask
 3327inline int fasttest::Value99_Present_GetBit(fasttest::FastState& parent) {
 3328    int retval = 19;
 3329    (void)parent;//only to avoid -Wunused-parameter
 3330    return retval;
 3331}
 3332
 3333// --- fasttest.FastState.Value99.Set
 3334inline void fasttest::Value99_Set(fasttest::FastState& parent, i32 rhs) {
 3335    parent.Value99 = rhs;
 3336    assigned_qSetBit(parent, 36); // mark presence in pmask
 3337    present_qSetBit(parent, 19); // mark presence in pmask
 3338}
 3339
 3340// --- fasttest.FastState.Value100.AssignedQ
 3341// Return true if the field is marked in the presence mask
 3342inline bool fasttest::Value100_AssignedQ(fasttest::FastState& parent) {
 3343    return assigned_qGetBit(parent, 0);
 3344}
 3345
 3346// --- fasttest.FastState.Value100.PresentQ
 3347// Return true if the field is marked in the presence mask
 3348inline bool fasttest::Value100_PresentQ(fasttest::FastState& parent) {
 3349    return present_qGetBit(parent, 0);
 3350}
 3351
 3352// --- fasttest.FastState.Value100.SetAssigned
 3353// Set presence bit for this field in the pmask
 3354inline void fasttest::Value100_SetAssigned(fasttest::FastState& parent) {
 3355    assigned_qSetBit(parent, 0); // mark presence in pmask
 3356}
 3357
 3358// --- fasttest.FastState.Value100.SetPresent
 3359// Set presence bit for this field in the pmask
 3360inline void fasttest::Value100_SetPresent(fasttest::FastState& parent) {
 3361    present_qSetBit(parent, 0); // mark presence in pmask
 3362}
 3363
 3364// --- fasttest.FastState.Value100.Assigned_GetBit
 3365// Return field's bit number in the pmask
 3366inline int fasttest::Value100_Assigned_GetBit(fasttest::FastState& parent) {
 3367    int retval = 0;
 3368    (void)parent;//only to avoid -Wunused-parameter
 3369    return retval;
 3370}
 3371
 3372// --- fasttest.FastState.Value100.Present_GetBit
 3373// Return field's bit number in the pmask
 3374inline int fasttest::Value100_Present_GetBit(fasttest::FastState& parent) {
 3375    int retval = 0;
 3376    (void)parent;//only to avoid -Wunused-parameter
 3377    return retval;
 3378}
 3379
 3380// --- fasttest.FastState.Value100.Set
 3381inline void fasttest::Value100_Set(fasttest::FastState& parent, i32 rhs) {
 3382    parent.Value100 = rhs;
 3383    assigned_qSetBit(parent, 0); // mark presence in pmask
 3384    present_qSetBit(parent, 0); // mark presence in pmask
 3385}
 3386
 3387// --- fasttest.FastState.Value101.AssignedQ
 3388// Return true if the field is marked in the presence mask
 3389inline bool fasttest::Value101_AssignedQ(fasttest::FastState& parent) {
 3390    return assigned_qGetBit(parent, 1);
 3391}
 3392
 3393// --- fasttest.FastState.Value101.SetAssigned
 3394// Set presence bit for this field in the pmask
 3395inline void fasttest::Value101_SetAssigned(fasttest::FastState& parent) {
 3396    assigned_qSetBit(parent, 1); // mark presence in pmask
 3397}
 3398
 3399// --- fasttest.FastState.Value101.Assigned_GetBit
 3400// Return field's bit number in the pmask
 3401inline int fasttest::Value101_Assigned_GetBit(fasttest::FastState& parent) {
 3402    int retval = 1;
 3403    (void)parent;//only to avoid -Wunused-parameter
 3404    return retval;
 3405}
 3406
 3407// --- fasttest.FastState.Value101.Set
 3408inline void fasttest::Value101_Set(fasttest::FastState& parent, u32 rhs) {
 3409    parent.Value101 = rhs;
 3410    assigned_qSetBit(parent, 1); // mark presence in pmask
 3411}
 3412
 3413// --- fasttest.FastState.Value102.AssignedQ
 3414// Return true if the field is marked in the presence mask
 3415inline bool fasttest::Value102_AssignedQ(fasttest::FastState& parent) {
 3416    return assigned_qGetBit(parent, 2);
 3417}
 3418
 3419// --- fasttest.FastState.Value102.SetAssigned
 3420// Set presence bit for this field in the pmask
 3421inline void fasttest::Value102_SetAssigned(fasttest::FastState& parent) {
 3422    assigned_qSetBit(parent, 2); // mark presence in pmask
 3423}
 3424
 3425// --- fasttest.FastState.Value102.Assigned_GetBit
 3426// Return field's bit number in the pmask
 3427inline int fasttest::Value102_Assigned_GetBit(fasttest::FastState& parent) {
 3428    int retval = 2;
 3429    (void)parent;//only to avoid -Wunused-parameter
 3430    return retval;
 3431}
 3432
 3433// --- fasttest.FastState.Value102.Set
 3434inline void fasttest::Value102_Set(fasttest::FastState& parent, u32 rhs) {
 3435    parent.Value102 = rhs;
 3436    assigned_qSetBit(parent, 2); // mark presence in pmask
 3437}
 3438
 3439// --- fasttest.FastState.Value103.AssignedQ
 3440// Return true if the field is marked in the presence mask
 3441inline bool fasttest::Value103_AssignedQ(fasttest::FastState& parent) {
 3442    return assigned_qGetBit(parent, 3);
 3443}
 3444
 3445// --- fasttest.FastState.Value103.PresentQ
 3446// Return true if the field is marked in the presence mask
 3447inline bool fasttest::Value103_PresentQ(fasttest::FastState& parent) {
 3448    return present_qGetBit(parent, 1);
 3449}
 3450
 3451// --- fasttest.FastState.Value103.SetAssigned
 3452// Set presence bit for this field in the pmask
 3453inline void fasttest::Value103_SetAssigned(fasttest::FastState& parent) {
 3454    assigned_qSetBit(parent, 3); // mark presence in pmask
 3455}
 3456
 3457// --- fasttest.FastState.Value103.SetPresent
 3458// Set presence bit for this field in the pmask
 3459inline void fasttest::Value103_SetPresent(fasttest::FastState& parent) {
 3460    present_qSetBit(parent, 1); // mark presence in pmask
 3461}
 3462
 3463// --- fasttest.FastState.Value103.Assigned_GetBit
 3464// Return field's bit number in the pmask
 3465inline int fasttest::Value103_Assigned_GetBit(fasttest::FastState& parent) {
 3466    int retval = 3;
 3467    (void)parent;//only to avoid -Wunused-parameter
 3468    return retval;
 3469}
 3470
 3471// --- fasttest.FastState.Value103.Present_GetBit
 3472// Return field's bit number in the pmask
 3473inline int fasttest::Value103_Present_GetBit(fasttest::FastState& parent) {
 3474    int retval = 1;
 3475    (void)parent;//only to avoid -Wunused-parameter
 3476    return retval;
 3477}
 3478
 3479// --- fasttest.FastState.Value103.Set
 3480inline void fasttest::Value103_Set(fasttest::FastState& parent, u32 rhs) {
 3481    parent.Value103 = rhs;
 3482    assigned_qSetBit(parent, 3); // mark presence in pmask
 3483    present_qSetBit(parent, 1); // mark presence in pmask
 3484}
 3485
 3486// --- fasttest.FastState.Value104.AssignedQ
 3487// Return true if the field is marked in the presence mask
 3488inline bool fasttest::Value104_AssignedQ(fasttest::FastState& parent) {
 3489    return assigned_qGetBit(parent, 4);
 3490}
 3491
 3492// --- fasttest.FastState.Value104.PresentQ
 3493// Return true if the field is marked in the presence mask
 3494inline bool fasttest::Value104_PresentQ(fasttest::FastState& parent) {
 3495    return present_qGetBit(parent, 2);
 3496}
 3497
 3498// --- fasttest.FastState.Value104.SetAssigned
 3499// Set presence bit for this field in the pmask
 3500inline void fasttest::Value104_SetAssigned(fasttest::FastState& parent) {
 3501    assigned_qSetBit(parent, 4); // mark presence in pmask
 3502}
 3503
 3504// --- fasttest.FastState.Value104.SetPresent
 3505// Set presence bit for this field in the pmask
 3506inline void fasttest::Value104_SetPresent(fasttest::FastState& parent) {
 3507    present_qSetBit(parent, 2); // mark presence in pmask
 3508}
 3509
 3510// --- fasttest.FastState.Value104.Assigned_GetBit
 3511// Return field's bit number in the pmask
 3512inline int fasttest::Value104_Assigned_GetBit(fasttest::FastState& parent) {
 3513    int retval = 4;
 3514    (void)parent;//only to avoid -Wunused-parameter
 3515    return retval;
 3516}
 3517
 3518// --- fasttest.FastState.Value104.Present_GetBit
 3519// Return field's bit number in the pmask
 3520inline int fasttest::Value104_Present_GetBit(fasttest::FastState& parent) {
 3521    int retval = 2;
 3522    (void)parent;//only to avoid -Wunused-parameter
 3523    return retval;
 3524}
 3525
 3526// --- fasttest.FastState.Value104.Set
 3527inline void fasttest::Value104_Set(fasttest::FastState& parent, u32 rhs) {
 3528    parent.Value104 = rhs;
 3529    assigned_qSetBit(parent, 4); // mark presence in pmask
 3530    present_qSetBit(parent, 2); // mark presence in pmask
 3531}
 3532
 3533// --- fasttest.FastState.Value147.AssignedQ
 3534// Return true if the field is marked in the presence mask
 3535inline bool fasttest::Value147_AssignedQ(fasttest::FastState& parent) {
 3536    return assigned_qGetBit(parent, 5);
 3537}
 3538
 3539// --- fasttest.FastState.Value147.SetAssigned
 3540// Set presence bit for this field in the pmask
 3541inline void fasttest::Value147_SetAssigned(fasttest::FastState& parent) {
 3542    assigned_qSetBit(parent, 5); // mark presence in pmask
 3543}
 3544
 3545// --- fasttest.FastState.Value147.Assigned_GetBit
 3546// Return field's bit number in the pmask
 3547inline int fasttest::Value147_Assigned_GetBit(fasttest::FastState& parent) {
 3548    int retval = 5;
 3549    (void)parent;//only to avoid -Wunused-parameter
 3550    return retval;
 3551}
 3552
 3553// --- fasttest.FastState.Value147.Set
 3554inline void fasttest::Value147_Set(fasttest::FastState& parent, fasttest::SampleEnum rhs) {
 3555    parent.Value147 = rhs;
 3556    assigned_qSetBit(parent, 5); // mark presence in pmask
 3557}
 3558
 3559// --- fasttest.FastState.Value150.AssignedQ
 3560// Return true if the field is marked in the presence mask
 3561inline bool fasttest::Value150_AssignedQ(fasttest::FastState& parent) {
 3562    return assigned_qGetBit(parent, 6);
 3563}
 3564
 3565// --- fasttest.FastState.Value150.SetAssigned
 3566// Set presence bit for this field in the pmask
 3567inline void fasttest::Value150_SetAssigned(fasttest::FastState& parent) {
 3568    assigned_qSetBit(parent, 6); // mark presence in pmask
 3569}
 3570
 3571// --- fasttest.FastState.Value150.Assigned_GetBit
 3572// Return field's bit number in the pmask
 3573inline int fasttest::Value150_Assigned_GetBit(fasttest::FastState& parent) {
 3574    int retval = 6;
 3575    (void)parent;//only to avoid -Wunused-parameter
 3576    return retval;
 3577}
 3578
 3579// --- fasttest.FastState.Value150.Set
 3580inline void fasttest::Value150_Set(fasttest::FastState& parent, fasttest::SampleSet rhs) {
 3581    parent.Value150 = rhs;
 3582    assigned_qSetBit(parent, 6); // mark presence in pmask
 3583}
 3584
 3585// --- fasttest.FastState.assigned_bitcurs.Reset
 3586inline void fasttest::FastState_assigned_bitcurs_Reset(FastState_assigned_bitcurs &curs, fasttest::FastState &parent) {
 3587    curs.elems = &assigned_qFind(parent,0);
 3588    curs.n_elems = assigned_N(parent);
 3589    curs.bit = -1;
 3590    FastState_assigned_bitcurs_Next(curs);
 3591}
 3592
 3593// --- fasttest.FastState.assigned_bitcurs.ValidQ
 3594// cursor points to valid item
 3595inline bool fasttest::FastState_assigned_bitcurs_ValidQ(FastState_assigned_bitcurs &curs) {
 3596    return curs.bit < curs.n_elems*64;
 3597}
 3598
 3599// --- fasttest.FastState.assigned_bitcurs.Access
 3600// item access
 3601inline int& fasttest::FastState_assigned_bitcurs_Access(FastState_assigned_bitcurs &curs) {
 3602    return curs.bit;
 3603}
 3604
 3605// --- fasttest.FastState.present_bitcurs.Reset
 3606inline void fasttest::FastState_present_bitcurs_Reset(FastState_present_bitcurs &curs, fasttest::FastState &parent) {
 3607    curs.elems = &present_qFind(parent,0);
 3608    curs.n_elems = present_N(parent);
 3609    curs.bit = -1;
 3610    FastState_present_bitcurs_Next(curs);
 3611}
 3612
 3613// --- fasttest.FastState.present_bitcurs.ValidQ
 3614// cursor points to valid item
 3615inline bool fasttest::FastState_present_bitcurs_ValidQ(FastState_present_bitcurs &curs) {
 3616    return curs.bit < curs.n_elems*32;
 3617}
 3618
 3619// --- fasttest.FastState.present_bitcurs.Access
 3620// item access
 3621inline int& fasttest::FastState_present_bitcurs_Access(FastState_present_bitcurs &curs) {
 3622    return curs.bit;
 3623}
 3624inline fasttest::FieldId::FieldId(i32                            in_value)
 3625    : value(in_value)
 3626{
 3627}
 3628inline fasttest::FieldId::FieldId(fasttest_FieldIdEnum arg) { this->value = i32(arg); }
 3629inline fasttest::FieldId::FieldId() {
 3630    fasttest::FieldId_Init(*this);
 3631}
 3632
 3633
 3634// --- fasttest.FieldId.value.GetEnum
 3635// Get value of field as enum type
 3636inline fasttest_FieldIdEnum fasttest::value_GetEnum(const fasttest::FieldId& parent) {
 3637    return fasttest_FieldIdEnum(parent.value);
 3638}
 3639
 3640// --- fasttest.FieldId.value.SetEnum
 3641// Set value of field from enum type.
 3642inline void fasttest::value_SetEnum(fasttest::FieldId& parent, fasttest_FieldIdEnum rhs) {
 3643    parent.value = i32(rhs);
 3644}
 3645
 3646// --- fasttest.FieldId.value.Cast
 3647inline fasttest::FieldId::operator fasttest_FieldIdEnum () const {
 3648    return fasttest_FieldIdEnum((*this).value);
 3649}
 3650
 3651// --- fasttest.FieldId..Init
 3652// Set all fields to initial values.
 3653inline void fasttest::FieldId_Init(fasttest::FieldId& parent) {
 3654    parent.value = i32(-1);
 3655}
 3656inline fasttest::FirstSeq::FirstSeq() {
 3657    fasttest::FirstSeq_Init(*this);
 3658}
 3659
 3660
 3661// --- fasttest.FirstSeq..Init
 3662// Set all fields to initial values.
 3663inline void fasttest::FirstSeq_Init(fasttest::FirstSeq& FirstSeq) {
 3664    FirstSeq.Value1 = u32(0);
 3665}
 3666inline fasttest::OptSgmGrp::OptSgmGrp() {
 3667    fasttest::OptSgmGrp_Init(*this);
 3668}
 3669
 3670
 3671// --- fasttest.OptSgmGrp..Init
 3672// Set all fields to initial values.
 3673inline void fasttest::OptSgmGrp_Init(fasttest::OptSgmGrp& parent) {
 3674    parent.Value = u32(1);
 3675}
 3676inline fasttest::GroupSgmOpt::GroupSgmOpt() {
 3677    fasttest::GroupSgmOpt_Init(*this);
 3678}
 3679
 3680
 3681// --- fasttest.GroupSgmOpt.base.Castdown
 3682// Check if fasttest::TemplateHeader is an instance of GroupSgmOpt by checking the type field
 3683// If it is, return the pointer of target type.
 3684// Additionally, check if the length field permits valid instance of GroupSgmOpt.
 3685// If not successful, quietly return NULL.
 3686inline fasttest::GroupSgmOpt* fasttest::GroupSgmOpt_Castdown(fasttest::TemplateHeader &hdr) {
 3687    bool cond = hdr.id == (115);
 3688    cond &= i32(hdr.length) >= ssizeof(fasttest::GroupSgmOpt);
 3689    return cond ? reinterpret_cast<fasttest::GroupSgmOpt*>(&hdr) : NULL;
 3690}
 3691
 3692// --- fasttest.GroupSgmOpt.base.Castbase
 3693inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::GroupSgmOpt& parent) {
 3694    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 3695}
 3696
 3697// --- fasttest.GroupSgmOpt.pmask.N
 3698// Return constant 1
 3699inline int fasttest::pmask_N(fasttest::GroupSgmOpt& parent) {
 3700    (void)parent;
 3701    return 1;
 3702}
 3703
 3704// --- fasttest.GroupSgmOpt.pmask.qFind
 3705// Access value
 3706inline u32& fasttest::pmask_qFind(fasttest::GroupSgmOpt& parent, int) {
 3707    return parent.pmask;
 3708}
 3709
 3710// --- fasttest.GroupSgmOpt.pmask.NBits
 3711// Get max # of bits in the bitset
 3712// Return max. number of bits supported by array
 3713inline int fasttest::pmask_Nbits(fasttest::GroupSgmOpt& parent) {
 3714    return pmask_N(parent) * 32;
 3715}
 3716
 3717// --- fasttest.GroupSgmOpt.pmask.qGetBit
 3718// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 3719inline bool fasttest::pmask_qGetBit(fasttest::GroupSgmOpt& parent, u32 bit_idx) {
 3720    u64 elem_idx = bit_idx >> 5;
 3721    u64 shift = bit_idx & 31;
 3722    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 3723    return bool((elem >> shift) & 1); // extract bit
 3724}
 3725
 3726// --- fasttest.GroupSgmOpt.pmask.GetBit
 3727// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 3728inline bool fasttest::pmask_GetBit(fasttest::GroupSgmOpt& parent, u32 bit_idx) {
 3729    u64 elem_idx = bit_idx >> 5;
 3730    u64 shift = bit_idx & 31;
 3731    bool ret = false;
 3732    u64 lim = pmask_N(parent);
 3733    if (elem_idx < lim) {
 3734        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 3735        ret = (elem >> shift) & 1;                 // extract bit
 3736    }
 3737    return ret;
 3738}
 3739
 3740// --- fasttest.GroupSgmOpt.pmask.BitsEmptyQ
 3741// Check if all the bits in the bitset are equal to zero
 3742inline bool fasttest::pmask_BitsEmptyQ(fasttest::GroupSgmOpt& parent) {
 3743    bool retval = true;
 3744    u64 n = pmask_N(parent);
 3745    for (u64 i = 0; i < n; i++) {
 3746        if (pmask_qFind(parent,i) != 0) {
 3747            retval = false;
 3748            break;
 3749        }
 3750    }
 3751    return retval;
 3752}
 3753
 3754// --- fasttest.GroupSgmOpt.pmask.Sum1s
 3755inline u64 fasttest::pmask_Sum1s(fasttest::GroupSgmOpt& parent) {
 3756    u64 sum = 0;
 3757    u64 n = pmask_N(parent);
 3758    for (u64 i = 0; i < n; i++) {
 3759        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 3760    }
 3761    return sum;
 3762}
 3763
 3764// --- fasttest.GroupSgmOpt.pmask.qClearBit
 3765// Clear bit # BIT_IDX in bit set. No bounds checking
 3766inline void fasttest::pmask_qClearBit(fasttest::GroupSgmOpt& parent, u32 bit_idx) {
 3767    u64 elem_idx = bit_idx >> 5;
 3768    u64 shift = bit_idx & 31;
 3769    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 3770    elem = elem & ~(u32(1) << shift); // clear bit
 3771}
 3772
 3773// --- fasttest.GroupSgmOpt.pmask.ClearBit
 3774// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 3775inline void fasttest::pmask_ClearBit(fasttest::GroupSgmOpt& parent, u32 bit_idx) {
 3776    u64 elem_idx = bit_idx >> 5;
 3777    u64 shift = bit_idx & 31;
 3778    u64 lim = pmask_N(parent);
 3779    if (elem_idx < lim) {
 3780        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 3781        elem = elem & ~(u32(1) << shift); // clear bit
 3782    }
 3783}
 3784
 3785// --- fasttest.GroupSgmOpt.pmask.qSetBit
 3786// Set bit # BIT_IDX in bit set. No bounds checking
 3787inline void fasttest::pmask_qSetBit(fasttest::GroupSgmOpt& parent, u32 bit_idx) {
 3788    u64 elem_idx = bit_idx >> 5;
 3789    u64 shift = bit_idx & 31;
 3790    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 3791    elem = elem | (u32(1) << shift); // set bit
 3792}
 3793
 3794// --- fasttest.GroupSgmOpt.pmask.SetBit
 3795// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 3796inline void fasttest::pmask_SetBit(fasttest::GroupSgmOpt& parent, u32 bit_idx) {
 3797    u64 elem_idx = bit_idx >> 5;
 3798    u64 shift = bit_idx & 31;
 3799    u64 lim = pmask_N(parent);
 3800    if (elem_idx < lim) {
 3801        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 3802        elem = elem | (u32(1) << shift); // set bit
 3803    }
 3804}
 3805
 3806// --- fasttest.GroupSgmOpt.pmask.qSetBitVal
 3807// Set bit # BIT_IDX in bit set. No bounds checking
 3808inline void fasttest::pmask_qSetBitVal(fasttest::GroupSgmOpt& parent, u32 bit_idx, bool val) {
 3809    u64 elem_idx = bit_idx >> 5;
 3810    u64 shift = bit_idx & 31;
 3811    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 3812    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 3813}
 3814
 3815// --- fasttest.GroupSgmOpt.pmask.qOrBitVal
 3816// Or bit # BIT_IDX in bit set. No bounds checking
 3817inline void fasttest::pmask_qOrBitVal(fasttest::GroupSgmOpt& parent, u32 bit_idx, bool val) {
 3818    u64 elem_idx = bit_idx >> 5;
 3819    u64 shift = bit_idx & 31;
 3820    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 3821    elem = elem | (u32(val) << shift); // Or in val into elem
 3822}
 3823
 3824// --- fasttest.GroupSgmOpt.pmask.ClearBitsAll
 3825// Set all bits of array to zero.
 3826// Note: this does not change what NBits will return.
 3827inline void fasttest::pmask_ClearBitsAll(fasttest::GroupSgmOpt& parent) {
 3828    u64 n = pmask_N(parent);
 3829    for (u64 i = 0; i < n; i++) {
 3830        pmask_qFind(parent, i) = 0;
 3831    }
 3832}
 3833
 3834// --- fasttest.GroupSgmOpt.pmask.ClearBits
 3835// Zero in PARENT any bits that are set in RHS.
 3836inline void fasttest::pmask_ClearBits(fasttest::GroupSgmOpt& parent, fasttest::GroupSgmOpt &rhs) {
 3837    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 3838    for (u64 i = 0; i < n; i++) {
 3839        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 3840    }
 3841}
 3842
 3843// --- fasttest.GroupSgmOpt.pmask.OrBits
 3844// Set PARENT to union of two bitsets.
 3845// (This function is not named Set.. to avoid triple entendre).
 3846inline void fasttest::pmask_OrBits(fasttest::GroupSgmOpt& parent, fasttest::GroupSgmOpt &rhs) {
 3847    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 3848    for (u64 i = 0; i < n; i++) {
 3849        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 3850    }
 3851}
 3852
 3853// --- fasttest.GroupSgmOpt.pmask.Sup
 3854// Return smallest number N such that indexes of all 1 bits are below N
 3855inline i32 fasttest::pmask_Sup(fasttest::GroupSgmOpt& parent) {
 3856    u64 lim = pmask_N(parent);
 3857    i32 ret = 0;
 3858    for (int i = lim-1; i >= 0; i--) {
 3859        u32 &val = pmask_qFind(parent, i);
 3860        if (val) {
 3861            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 3862            ret = i * 32 + bitidx;
 3863            break;
 3864        }
 3865    }
 3866    return ret;
 3867}
 3868
 3869// --- fasttest.GroupSgmOpt.OptSgmGrp.PresentQ
 3870// Return true if the field is marked in the presence mask
 3871inline bool fasttest::OptSgmGrp_PresentQ(fasttest::GroupSgmOpt& parent) {
 3872    return pmask_qGetBit(parent, 0);
 3873}
 3874
 3875// --- fasttest.GroupSgmOpt.OptSgmGrp.SetPresent
 3876// Set presence bit for this field in the pmask
 3877inline void fasttest::OptSgmGrp_SetPresent(fasttest::GroupSgmOpt& parent) {
 3878    pmask_qSetBit(parent, 0); // mark presence in pmask
 3879}
 3880
 3881// --- fasttest.GroupSgmOpt.OptSgmGrp.Present_GetBit
 3882// Return field's bit number in the pmask
 3883inline int fasttest::OptSgmGrp_Present_GetBit(fasttest::GroupSgmOpt& parent) {
 3884    int retval = 0;
 3885    (void)parent;//only to avoid -Wunused-parameter
 3886    return retval;
 3887}
 3888
 3889// --- fasttest.GroupSgmOpt.OptSgmGrp.Set
 3890inline void fasttest::OptSgmGrp_Set(fasttest::GroupSgmOpt& parent, const fasttest::OptSgmGrp& rhs) {
 3891    parent.OptSgmGrp = rhs;
 3892    pmask_qSetBit(parent, 0); // mark presence in pmask
 3893}
 3894
 3895// --- fasttest.GroupSgmOpt.pmask_bitcurs.Reset
 3896inline void fasttest::GroupSgmOpt_pmask_bitcurs_Reset(GroupSgmOpt_pmask_bitcurs &curs, fasttest::GroupSgmOpt &parent) {
 3897    curs.elems = &pmask_qFind(parent,0);
 3898    curs.n_elems = pmask_N(parent);
 3899    curs.bit = -1;
 3900    GroupSgmOpt_pmask_bitcurs_Next(curs);
 3901}
 3902
 3903// --- fasttest.GroupSgmOpt.pmask_bitcurs.ValidQ
 3904// cursor points to valid item
 3905inline bool fasttest::GroupSgmOpt_pmask_bitcurs_ValidQ(GroupSgmOpt_pmask_bitcurs &curs) {
 3906    return curs.bit < curs.n_elems*32;
 3907}
 3908
 3909// --- fasttest.GroupSgmOpt.pmask_bitcurs.Access
 3910// item access
 3911inline int& fasttest::GroupSgmOpt_pmask_bitcurs_Access(GroupSgmOpt_pmask_bitcurs &curs) {
 3912    return curs.bit;
 3913}
 3914
 3915// --- fasttest.GroupSgmOpt..GetMsgLength
 3916// Message length (uses length field)
 3917inline i32 fasttest::GetMsgLength(const fasttest::GroupSgmOpt& parent) {
 3918    return i32(const_cast<fasttest::GroupSgmOpt&>(parent).length);
 3919}
 3920
 3921// --- fasttest.GroupSgmOpt..GetMsgMemptr
 3922// Memptr encompassing the message (uses length field)
 3923inline algo::memptr fasttest::GetMsgMemptr(const fasttest::GroupSgmOpt& row) {
 3924    return algo::memptr((u8*)&row, i32(const_cast<fasttest::GroupSgmOpt&>(row).length));
 3925}
 3926
 3927// --- fasttest.GroupSgmOpt..Init
 3928// Set all fields to initial values.
 3929inline void fasttest::GroupSgmOpt_Init(fasttest::GroupSgmOpt& parent) {
 3930    parent.length = u32(ssizeof(parent) + (0));
 3931    parent.id = u32(115);
 3932    parent.pmask = u32(0);
 3933}
 3934inline fasttest::TrvGrp::TrvGrp() {
 3935    fasttest::TrvGrp_Init(*this);
 3936}
 3937
 3938
 3939// --- fasttest.TrvGrp..Init
 3940// Set all fields to initial values.
 3941inline void fasttest::TrvGrp_Init(fasttest::TrvGrp& parent) {
 3942    parent.Value = u32(0);
 3943}
 3944inline fasttest::GroupTrv::GroupTrv() {
 3945    fasttest::GroupTrv_Init(*this);
 3946}
 3947
 3948
 3949// --- fasttest.GroupTrv.base.Castdown
 3950// Check if fasttest::TemplateHeader is an instance of GroupTrv by checking the type field
 3951// If it is, return the pointer of target type.
 3952// Additionally, check if the length field permits valid instance of GroupTrv.
 3953// If not successful, quietly return NULL.
 3954inline fasttest::GroupTrv* fasttest::GroupTrv_Castdown(fasttest::TemplateHeader &hdr) {
 3955    bool cond = hdr.id == (113);
 3956    cond &= i32(hdr.length) >= ssizeof(fasttest::GroupTrv);
 3957    return cond ? reinterpret_cast<fasttest::GroupTrv*>(&hdr) : NULL;
 3958}
 3959
 3960// --- fasttest.GroupTrv.base.Castbase
 3961inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::GroupTrv& parent) {
 3962    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 3963}
 3964
 3965// --- fasttest.GroupTrv..GetMsgLength
 3966// Message length (uses length field)
 3967inline i32 fasttest::GetMsgLength(const fasttest::GroupTrv& parent) {
 3968    return i32(const_cast<fasttest::GroupTrv&>(parent).length);
 3969}
 3970
 3971// --- fasttest.GroupTrv..GetMsgMemptr
 3972// Memptr encompassing the message (uses length field)
 3973inline algo::memptr fasttest::GetMsgMemptr(const fasttest::GroupTrv& row) {
 3974    return algo::memptr((u8*)&row, i32(const_cast<fasttest::GroupTrv&>(row).length));
 3975}
 3976
 3977// --- fasttest.GroupTrv..Init
 3978// Set all fields to initial values.
 3979inline void fasttest::GroupTrv_Init(fasttest::GroupTrv& parent) {
 3980    parent.length = u32(ssizeof(parent) + (0));
 3981    parent.id = u32(113);
 3982}
 3983inline fasttest::OptTrvGrp::OptTrvGrp() {
 3984    fasttest::OptTrvGrp_Init(*this);
 3985}
 3986
 3987
 3988// --- fasttest.OptTrvGrp..Init
 3989// Set all fields to initial values.
 3990inline void fasttest::OptTrvGrp_Init(fasttest::OptTrvGrp& parent) {
 3991    parent.Value = u32(0);
 3992}
 3993inline fasttest::GroupTrvOpt::GroupTrvOpt() {
 3994    fasttest::GroupTrvOpt_Init(*this);
 3995}
 3996
 3997
 3998// --- fasttest.GroupTrvOpt.base.Castdown
 3999// Check if fasttest::TemplateHeader is an instance of GroupTrvOpt by checking the type field
 4000// If it is, return the pointer of target type.
 4001// Additionally, check if the length field permits valid instance of GroupTrvOpt.
 4002// If not successful, quietly return NULL.
 4003inline fasttest::GroupTrvOpt* fasttest::GroupTrvOpt_Castdown(fasttest::TemplateHeader &hdr) {
 4004    bool cond = hdr.id == (114);
 4005    cond &= i32(hdr.length) >= ssizeof(fasttest::GroupTrvOpt);
 4006    return cond ? reinterpret_cast<fasttest::GroupTrvOpt*>(&hdr) : NULL;
 4007}
 4008
 4009// --- fasttest.GroupTrvOpt.base.Castbase
 4010inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::GroupTrvOpt& parent) {
 4011    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 4012}
 4013
 4014// --- fasttest.GroupTrvOpt.pmask.N
 4015// Return constant 1
 4016inline int fasttest::pmask_N(fasttest::GroupTrvOpt& parent) {
 4017    (void)parent;
 4018    return 1;
 4019}
 4020
 4021// --- fasttest.GroupTrvOpt.pmask.qFind
 4022// Access value
 4023inline u32& fasttest::pmask_qFind(fasttest::GroupTrvOpt& parent, int) {
 4024    return parent.pmask;
 4025}
 4026
 4027// --- fasttest.GroupTrvOpt.pmask.NBits
 4028// Get max # of bits in the bitset
 4029// Return max. number of bits supported by array
 4030inline int fasttest::pmask_Nbits(fasttest::GroupTrvOpt& parent) {
 4031    return pmask_N(parent) * 32;
 4032}
 4033
 4034// --- fasttest.GroupTrvOpt.pmask.qGetBit
 4035// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 4036inline bool fasttest::pmask_qGetBit(fasttest::GroupTrvOpt& parent, u32 bit_idx) {
 4037    u64 elem_idx = bit_idx >> 5;
 4038    u64 shift = bit_idx & 31;
 4039    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4040    return bool((elem >> shift) & 1); // extract bit
 4041}
 4042
 4043// --- fasttest.GroupTrvOpt.pmask.GetBit
 4044// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 4045inline bool fasttest::pmask_GetBit(fasttest::GroupTrvOpt& parent, u32 bit_idx) {
 4046    u64 elem_idx = bit_idx >> 5;
 4047    u64 shift = bit_idx & 31;
 4048    bool ret = false;
 4049    u64 lim = pmask_N(parent);
 4050    if (elem_idx < lim) {
 4051        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4052        ret = (elem >> shift) & 1;                 // extract bit
 4053    }
 4054    return ret;
 4055}
 4056
 4057// --- fasttest.GroupTrvOpt.pmask.BitsEmptyQ
 4058// Check if all the bits in the bitset are equal to zero
 4059inline bool fasttest::pmask_BitsEmptyQ(fasttest::GroupTrvOpt& parent) {
 4060    bool retval = true;
 4061    u64 n = pmask_N(parent);
 4062    for (u64 i = 0; i < n; i++) {
 4063        if (pmask_qFind(parent,i) != 0) {
 4064            retval = false;
 4065            break;
 4066        }
 4067    }
 4068    return retval;
 4069}
 4070
 4071// --- fasttest.GroupTrvOpt.pmask.Sum1s
 4072inline u64 fasttest::pmask_Sum1s(fasttest::GroupTrvOpt& parent) {
 4073    u64 sum = 0;
 4074    u64 n = pmask_N(parent);
 4075    for (u64 i = 0; i < n; i++) {
 4076        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 4077    }
 4078    return sum;
 4079}
 4080
 4081// --- fasttest.GroupTrvOpt.pmask.qClearBit
 4082// Clear bit # BIT_IDX in bit set. No bounds checking
 4083inline void fasttest::pmask_qClearBit(fasttest::GroupTrvOpt& parent, u32 bit_idx) {
 4084    u64 elem_idx = bit_idx >> 5;
 4085    u64 shift = bit_idx & 31;
 4086    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4087    elem = elem & ~(u32(1) << shift); // clear bit
 4088}
 4089
 4090// --- fasttest.GroupTrvOpt.pmask.ClearBit
 4091// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 4092inline void fasttest::pmask_ClearBit(fasttest::GroupTrvOpt& parent, u32 bit_idx) {
 4093    u64 elem_idx = bit_idx >> 5;
 4094    u64 shift = bit_idx & 31;
 4095    u64 lim = pmask_N(parent);
 4096    if (elem_idx < lim) {
 4097        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4098        elem = elem & ~(u32(1) << shift); // clear bit
 4099    }
 4100}
 4101
 4102// --- fasttest.GroupTrvOpt.pmask.qSetBit
 4103// Set bit # BIT_IDX in bit set. No bounds checking
 4104inline void fasttest::pmask_qSetBit(fasttest::GroupTrvOpt& parent, u32 bit_idx) {
 4105    u64 elem_idx = bit_idx >> 5;
 4106    u64 shift = bit_idx & 31;
 4107    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4108    elem = elem | (u32(1) << shift); // set bit
 4109}
 4110
 4111// --- fasttest.GroupTrvOpt.pmask.SetBit
 4112// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 4113inline void fasttest::pmask_SetBit(fasttest::GroupTrvOpt& parent, u32 bit_idx) {
 4114    u64 elem_idx = bit_idx >> 5;
 4115    u64 shift = bit_idx & 31;
 4116    u64 lim = pmask_N(parent);
 4117    if (elem_idx < lim) {
 4118        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4119        elem = elem | (u32(1) << shift); // set bit
 4120    }
 4121}
 4122
 4123// --- fasttest.GroupTrvOpt.pmask.qSetBitVal
 4124// Set bit # BIT_IDX in bit set. No bounds checking
 4125inline void fasttest::pmask_qSetBitVal(fasttest::GroupTrvOpt& parent, u32 bit_idx, bool val) {
 4126    u64 elem_idx = bit_idx >> 5;
 4127    u64 shift = bit_idx & 31;
 4128    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4129    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 4130}
 4131
 4132// --- fasttest.GroupTrvOpt.pmask.qOrBitVal
 4133// Or bit # BIT_IDX in bit set. No bounds checking
 4134inline void fasttest::pmask_qOrBitVal(fasttest::GroupTrvOpt& parent, u32 bit_idx, bool val) {
 4135    u64 elem_idx = bit_idx >> 5;
 4136    u64 shift = bit_idx & 31;
 4137    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4138    elem = elem | (u32(val) << shift); // Or in val into elem
 4139}
 4140
 4141// --- fasttest.GroupTrvOpt.pmask.ClearBitsAll
 4142// Set all bits of array to zero.
 4143// Note: this does not change what NBits will return.
 4144inline void fasttest::pmask_ClearBitsAll(fasttest::GroupTrvOpt& parent) {
 4145    u64 n = pmask_N(parent);
 4146    for (u64 i = 0; i < n; i++) {
 4147        pmask_qFind(parent, i) = 0;
 4148    }
 4149}
 4150
 4151// --- fasttest.GroupTrvOpt.pmask.ClearBits
 4152// Zero in PARENT any bits that are set in RHS.
 4153inline void fasttest::pmask_ClearBits(fasttest::GroupTrvOpt& parent, fasttest::GroupTrvOpt &rhs) {
 4154    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 4155    for (u64 i = 0; i < n; i++) {
 4156        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 4157    }
 4158}
 4159
 4160// --- fasttest.GroupTrvOpt.pmask.OrBits
 4161// Set PARENT to union of two bitsets.
 4162// (This function is not named Set.. to avoid triple entendre).
 4163inline void fasttest::pmask_OrBits(fasttest::GroupTrvOpt& parent, fasttest::GroupTrvOpt &rhs) {
 4164    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 4165    for (u64 i = 0; i < n; i++) {
 4166        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 4167    }
 4168}
 4169
 4170// --- fasttest.GroupTrvOpt.pmask.Sup
 4171// Return smallest number N such that indexes of all 1 bits are below N
 4172inline i32 fasttest::pmask_Sup(fasttest::GroupTrvOpt& parent) {
 4173    u64 lim = pmask_N(parent);
 4174    i32 ret = 0;
 4175    for (int i = lim-1; i >= 0; i--) {
 4176        u32 &val = pmask_qFind(parent, i);
 4177        if (val) {
 4178            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 4179            ret = i * 32 + bitidx;
 4180            break;
 4181        }
 4182    }
 4183    return ret;
 4184}
 4185
 4186// --- fasttest.GroupTrvOpt.OptTrvGrp.PresentQ
 4187// Return true if the field is marked in the presence mask
 4188inline bool fasttest::OptTrvGrp_PresentQ(fasttest::GroupTrvOpt& parent) {
 4189    return pmask_qGetBit(parent, 0);
 4190}
 4191
 4192// --- fasttest.GroupTrvOpt.OptTrvGrp.SetPresent
 4193// Set presence bit for this field in the pmask
 4194inline void fasttest::OptTrvGrp_SetPresent(fasttest::GroupTrvOpt& parent) {
 4195    pmask_qSetBit(parent, 0); // mark presence in pmask
 4196}
 4197
 4198// --- fasttest.GroupTrvOpt.OptTrvGrp.Present_GetBit
 4199// Return field's bit number in the pmask
 4200inline int fasttest::OptTrvGrp_Present_GetBit(fasttest::GroupTrvOpt& parent) {
 4201    int retval = 0;
 4202    (void)parent;//only to avoid -Wunused-parameter
 4203    return retval;
 4204}
 4205
 4206// --- fasttest.GroupTrvOpt.OptTrvGrp.Set
 4207inline void fasttest::OptTrvGrp_Set(fasttest::GroupTrvOpt& parent, const fasttest::OptTrvGrp& rhs) {
 4208    parent.OptTrvGrp = rhs;
 4209    pmask_qSetBit(parent, 0); // mark presence in pmask
 4210}
 4211
 4212// --- fasttest.GroupTrvOpt.pmask_bitcurs.Reset
 4213inline void fasttest::GroupTrvOpt_pmask_bitcurs_Reset(GroupTrvOpt_pmask_bitcurs &curs, fasttest::GroupTrvOpt &parent) {
 4214    curs.elems = &pmask_qFind(parent,0);
 4215    curs.n_elems = pmask_N(parent);
 4216    curs.bit = -1;
 4217    GroupTrvOpt_pmask_bitcurs_Next(curs);
 4218}
 4219
 4220// --- fasttest.GroupTrvOpt.pmask_bitcurs.ValidQ
 4221// cursor points to valid item
 4222inline bool fasttest::GroupTrvOpt_pmask_bitcurs_ValidQ(GroupTrvOpt_pmask_bitcurs &curs) {
 4223    return curs.bit < curs.n_elems*32;
 4224}
 4225
 4226// --- fasttest.GroupTrvOpt.pmask_bitcurs.Access
 4227// item access
 4228inline int& fasttest::GroupTrvOpt_pmask_bitcurs_Access(GroupTrvOpt_pmask_bitcurs &curs) {
 4229    return curs.bit;
 4230}
 4231
 4232// --- fasttest.GroupTrvOpt..GetMsgLength
 4233// Message length (uses length field)
 4234inline i32 fasttest::GetMsgLength(const fasttest::GroupTrvOpt& parent) {
 4235    return i32(const_cast<fasttest::GroupTrvOpt&>(parent).length);
 4236}
 4237
 4238// --- fasttest.GroupTrvOpt..GetMsgMemptr
 4239// Memptr encompassing the message (uses length field)
 4240inline algo::memptr fasttest::GetMsgMemptr(const fasttest::GroupTrvOpt& row) {
 4241    return algo::memptr((u8*)&row, i32(const_cast<fasttest::GroupTrvOpt&>(row).length));
 4242}
 4243
 4244// --- fasttest.GroupTrvOpt..Init
 4245// Set all fields to initial values.
 4246inline void fasttest::GroupTrvOpt_Init(fasttest::GroupTrvOpt& parent) {
 4247    parent.length = u32(ssizeof(parent) + (0));
 4248    parent.id = u32(114);
 4249    parent.pmask = u32(0);
 4250}
 4251inline fasttest::I32Const::I32Const() {
 4252    fasttest::I32Const_Init(*this);
 4253}
 4254
 4255
 4256// --- fasttest.I32Const.base.Castdown
 4257// Check if fasttest::TemplateHeader is an instance of I32Const by checking the type field
 4258// If it is, return the pointer of target type.
 4259// Additionally, check if the length field permits valid instance of I32Const.
 4260// If not successful, quietly return NULL.
 4261inline fasttest::I32Const* fasttest::I32Const_Castdown(fasttest::TemplateHeader &hdr) {
 4262    bool cond = hdr.id == (17);
 4263    cond &= i32(hdr.length) >= ssizeof(fasttest::I32Const);
 4264    return cond ? reinterpret_cast<fasttest::I32Const*>(&hdr) : NULL;
 4265}
 4266
 4267// --- fasttest.I32Const.base.Castbase
 4268inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32Const& parent) {
 4269    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 4270}
 4271
 4272// --- fasttest.I32Const.Value.Get
 4273inline i32 fasttest::Value_Get(fasttest::I32Const& parent) {
 4274    (void)parent;
 4275    return i32(17);
 4276}
 4277
 4278// --- fasttest.I32Const..GetMsgLength
 4279// Message length (uses length field)
 4280inline i32 fasttest::GetMsgLength(const fasttest::I32Const& parent) {
 4281    return i32(const_cast<fasttest::I32Const&>(parent).length);
 4282}
 4283
 4284// --- fasttest.I32Const..GetMsgMemptr
 4285// Memptr encompassing the message (uses length field)
 4286inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32Const& row) {
 4287    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32Const&>(row).length));
 4288}
 4289
 4290// --- fasttest.I32Const..Init
 4291// Set all fields to initial values.
 4292inline void fasttest::I32Const_Init(fasttest::I32Const& parent) {
 4293    parent.length = u32(ssizeof(parent) + (0));
 4294    parent.id = u32(17);
 4295}
 4296inline fasttest::I32ConstOpt::I32ConstOpt() {
 4297    fasttest::I32ConstOpt_Init(*this);
 4298}
 4299
 4300
 4301// --- fasttest.I32ConstOpt.base.Castdown
 4302// Check if fasttest::TemplateHeader is an instance of I32ConstOpt by checking the type field
 4303// If it is, return the pointer of target type.
 4304// Additionally, check if the length field permits valid instance of I32ConstOpt.
 4305// If not successful, quietly return NULL.
 4306inline fasttest::I32ConstOpt* fasttest::I32ConstOpt_Castdown(fasttest::TemplateHeader &hdr) {
 4307    bool cond = hdr.id == (18);
 4308    cond &= i32(hdr.length) >= ssizeof(fasttest::I32ConstOpt);
 4309    return cond ? reinterpret_cast<fasttest::I32ConstOpt*>(&hdr) : NULL;
 4310}
 4311
 4312// --- fasttest.I32ConstOpt.base.Castbase
 4313inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32ConstOpt& parent) {
 4314    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 4315}
 4316
 4317// --- fasttest.I32ConstOpt.pmask.N
 4318// Return constant 1
 4319inline int fasttest::pmask_N(fasttest::I32ConstOpt& parent) {
 4320    (void)parent;
 4321    return 1;
 4322}
 4323
 4324// --- fasttest.I32ConstOpt.pmask.qFind
 4325// Access value
 4326inline u32& fasttest::pmask_qFind(fasttest::I32ConstOpt& parent, int) {
 4327    return parent.pmask;
 4328}
 4329
 4330// --- fasttest.I32ConstOpt.pmask.NBits
 4331// Get max # of bits in the bitset
 4332// Return max. number of bits supported by array
 4333inline int fasttest::pmask_Nbits(fasttest::I32ConstOpt& parent) {
 4334    return pmask_N(parent) * 32;
 4335}
 4336
 4337// --- fasttest.I32ConstOpt.pmask.qGetBit
 4338// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 4339inline bool fasttest::pmask_qGetBit(fasttest::I32ConstOpt& parent, u32 bit_idx) {
 4340    u64 elem_idx = bit_idx >> 5;
 4341    u64 shift = bit_idx & 31;
 4342    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4343    return bool((elem >> shift) & 1); // extract bit
 4344}
 4345
 4346// --- fasttest.I32ConstOpt.pmask.GetBit
 4347// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 4348inline bool fasttest::pmask_GetBit(fasttest::I32ConstOpt& parent, u32 bit_idx) {
 4349    u64 elem_idx = bit_idx >> 5;
 4350    u64 shift = bit_idx & 31;
 4351    bool ret = false;
 4352    u64 lim = pmask_N(parent);
 4353    if (elem_idx < lim) {
 4354        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4355        ret = (elem >> shift) & 1;                 // extract bit
 4356    }
 4357    return ret;
 4358}
 4359
 4360// --- fasttest.I32ConstOpt.pmask.BitsEmptyQ
 4361// Check if all the bits in the bitset are equal to zero
 4362inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32ConstOpt& parent) {
 4363    bool retval = true;
 4364    u64 n = pmask_N(parent);
 4365    for (u64 i = 0; i < n; i++) {
 4366        if (pmask_qFind(parent,i) != 0) {
 4367            retval = false;
 4368            break;
 4369        }
 4370    }
 4371    return retval;
 4372}
 4373
 4374// --- fasttest.I32ConstOpt.pmask.Sum1s
 4375inline u64 fasttest::pmask_Sum1s(fasttest::I32ConstOpt& parent) {
 4376    u64 sum = 0;
 4377    u64 n = pmask_N(parent);
 4378    for (u64 i = 0; i < n; i++) {
 4379        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 4380    }
 4381    return sum;
 4382}
 4383
 4384// --- fasttest.I32ConstOpt.pmask.qClearBit
 4385// Clear bit # BIT_IDX in bit set. No bounds checking
 4386inline void fasttest::pmask_qClearBit(fasttest::I32ConstOpt& parent, u32 bit_idx) {
 4387    u64 elem_idx = bit_idx >> 5;
 4388    u64 shift = bit_idx & 31;
 4389    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4390    elem = elem & ~(u32(1) << shift); // clear bit
 4391}
 4392
 4393// --- fasttest.I32ConstOpt.pmask.ClearBit
 4394// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 4395inline void fasttest::pmask_ClearBit(fasttest::I32ConstOpt& parent, u32 bit_idx) {
 4396    u64 elem_idx = bit_idx >> 5;
 4397    u64 shift = bit_idx & 31;
 4398    u64 lim = pmask_N(parent);
 4399    if (elem_idx < lim) {
 4400        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4401        elem = elem & ~(u32(1) << shift); // clear bit
 4402    }
 4403}
 4404
 4405// --- fasttest.I32ConstOpt.pmask.qSetBit
 4406// Set bit # BIT_IDX in bit set. No bounds checking
 4407inline void fasttest::pmask_qSetBit(fasttest::I32ConstOpt& parent, u32 bit_idx) {
 4408    u64 elem_idx = bit_idx >> 5;
 4409    u64 shift = bit_idx & 31;
 4410    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4411    elem = elem | (u32(1) << shift); // set bit
 4412}
 4413
 4414// --- fasttest.I32ConstOpt.pmask.SetBit
 4415// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 4416inline void fasttest::pmask_SetBit(fasttest::I32ConstOpt& parent, u32 bit_idx) {
 4417    u64 elem_idx = bit_idx >> 5;
 4418    u64 shift = bit_idx & 31;
 4419    u64 lim = pmask_N(parent);
 4420    if (elem_idx < lim) {
 4421        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4422        elem = elem | (u32(1) << shift); // set bit
 4423    }
 4424}
 4425
 4426// --- fasttest.I32ConstOpt.pmask.qSetBitVal
 4427// Set bit # BIT_IDX in bit set. No bounds checking
 4428inline void fasttest::pmask_qSetBitVal(fasttest::I32ConstOpt& parent, u32 bit_idx, bool val) {
 4429    u64 elem_idx = bit_idx >> 5;
 4430    u64 shift = bit_idx & 31;
 4431    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4432    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 4433}
 4434
 4435// --- fasttest.I32ConstOpt.pmask.qOrBitVal
 4436// Or bit # BIT_IDX in bit set. No bounds checking
 4437inline void fasttest::pmask_qOrBitVal(fasttest::I32ConstOpt& parent, u32 bit_idx, bool val) {
 4438    u64 elem_idx = bit_idx >> 5;
 4439    u64 shift = bit_idx & 31;
 4440    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4441    elem = elem | (u32(val) << shift); // Or in val into elem
 4442}
 4443
 4444// --- fasttest.I32ConstOpt.pmask.ClearBitsAll
 4445// Set all bits of array to zero.
 4446// Note: this does not change what NBits will return.
 4447inline void fasttest::pmask_ClearBitsAll(fasttest::I32ConstOpt& parent) {
 4448    u64 n = pmask_N(parent);
 4449    for (u64 i = 0; i < n; i++) {
 4450        pmask_qFind(parent, i) = 0;
 4451    }
 4452}
 4453
 4454// --- fasttest.I32ConstOpt.pmask.ClearBits
 4455// Zero in PARENT any bits that are set in RHS.
 4456inline void fasttest::pmask_ClearBits(fasttest::I32ConstOpt& parent, fasttest::I32ConstOpt &rhs) {
 4457    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 4458    for (u64 i = 0; i < n; i++) {
 4459        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 4460    }
 4461}
 4462
 4463// --- fasttest.I32ConstOpt.pmask.OrBits
 4464// Set PARENT to union of two bitsets.
 4465// (This function is not named Set.. to avoid triple entendre).
 4466inline void fasttest::pmask_OrBits(fasttest::I32ConstOpt& parent, fasttest::I32ConstOpt &rhs) {
 4467    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 4468    for (u64 i = 0; i < n; i++) {
 4469        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 4470    }
 4471}
 4472
 4473// --- fasttest.I32ConstOpt.pmask.Sup
 4474// Return smallest number N such that indexes of all 1 bits are below N
 4475inline i32 fasttest::pmask_Sup(fasttest::I32ConstOpt& parent) {
 4476    u64 lim = pmask_N(parent);
 4477    i32 ret = 0;
 4478    for (int i = lim-1; i >= 0; i--) {
 4479        u32 &val = pmask_qFind(parent, i);
 4480        if (val) {
 4481            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 4482            ret = i * 32 + bitidx;
 4483            break;
 4484        }
 4485    }
 4486    return ret;
 4487}
 4488
 4489// --- fasttest.I32ConstOpt.Value.PresentQ
 4490// Return true if the field is marked in the presence mask
 4491inline bool fasttest::Value_PresentQ(fasttest::I32ConstOpt& parent) {
 4492    return pmask_qGetBit(parent, 0);
 4493}
 4494
 4495// --- fasttest.I32ConstOpt.Value.SetPresent
 4496// Set presence bit for this field in the pmask
 4497inline void fasttest::Value_SetPresent(fasttest::I32ConstOpt& parent) {
 4498    pmask_qSetBit(parent, 0); // mark presence in pmask
 4499}
 4500
 4501// --- fasttest.I32ConstOpt.Value.Present_GetBit
 4502// Return field's bit number in the pmask
 4503inline int fasttest::Value_Present_GetBit(fasttest::I32ConstOpt& parent) {
 4504    int retval = 0;
 4505    (void)parent;//only to avoid -Wunused-parameter
 4506    return retval;
 4507}
 4508
 4509// --- fasttest.I32ConstOpt.Value.Get
 4510inline i32 fasttest::Value_Get(fasttest::I32ConstOpt& parent) {
 4511    (void)parent;
 4512    return i32(18);
 4513}
 4514
 4515// --- fasttest.I32ConstOpt.pmask_bitcurs.Reset
 4516inline void fasttest::I32ConstOpt_pmask_bitcurs_Reset(I32ConstOpt_pmask_bitcurs &curs, fasttest::I32ConstOpt &parent) {
 4517    curs.elems = &pmask_qFind(parent,0);
 4518    curs.n_elems = pmask_N(parent);
 4519    curs.bit = -1;
 4520    I32ConstOpt_pmask_bitcurs_Next(curs);
 4521}
 4522
 4523// --- fasttest.I32ConstOpt.pmask_bitcurs.ValidQ
 4524// cursor points to valid item
 4525inline bool fasttest::I32ConstOpt_pmask_bitcurs_ValidQ(I32ConstOpt_pmask_bitcurs &curs) {
 4526    return curs.bit < curs.n_elems*32;
 4527}
 4528
 4529// --- fasttest.I32ConstOpt.pmask_bitcurs.Access
 4530// item access
 4531inline int& fasttest::I32ConstOpt_pmask_bitcurs_Access(I32ConstOpt_pmask_bitcurs &curs) {
 4532    return curs.bit;
 4533}
 4534
 4535// --- fasttest.I32ConstOpt..GetMsgLength
 4536// Message length (uses length field)
 4537inline i32 fasttest::GetMsgLength(const fasttest::I32ConstOpt& parent) {
 4538    return i32(const_cast<fasttest::I32ConstOpt&>(parent).length);
 4539}
 4540
 4541// --- fasttest.I32ConstOpt..GetMsgMemptr
 4542// Memptr encompassing the message (uses length field)
 4543inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32ConstOpt& row) {
 4544    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32ConstOpt&>(row).length));
 4545}
 4546
 4547// --- fasttest.I32ConstOpt..Init
 4548// Set all fields to initial values.
 4549inline void fasttest::I32ConstOpt_Init(fasttest::I32ConstOpt& parent) {
 4550    parent.length = u32(ssizeof(parent) + (0));
 4551    parent.id = u32(18);
 4552    parent.pmask = u32(0);
 4553}
 4554inline fasttest::I32Copy::I32Copy() {
 4555    fasttest::I32Copy_Init(*this);
 4556}
 4557
 4558
 4559// --- fasttest.I32Copy.base.Castdown
 4560// Check if fasttest::TemplateHeader is an instance of I32Copy by checking the type field
 4561// If it is, return the pointer of target type.
 4562// Additionally, check if the length field permits valid instance of I32Copy.
 4563// If not successful, quietly return NULL.
 4564inline fasttest::I32Copy* fasttest::I32Copy_Castdown(fasttest::TemplateHeader &hdr) {
 4565    bool cond = hdr.id == (49);
 4566    cond &= i32(hdr.length) >= ssizeof(fasttest::I32Copy);
 4567    return cond ? reinterpret_cast<fasttest::I32Copy*>(&hdr) : NULL;
 4568}
 4569
 4570// --- fasttest.I32Copy.base.Castbase
 4571inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32Copy& parent) {
 4572    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 4573}
 4574
 4575// --- fasttest.I32Copy..GetMsgLength
 4576// Message length (uses length field)
 4577inline i32 fasttest::GetMsgLength(const fasttest::I32Copy& parent) {
 4578    return i32(const_cast<fasttest::I32Copy&>(parent).length);
 4579}
 4580
 4581// --- fasttest.I32Copy..GetMsgMemptr
 4582// Memptr encompassing the message (uses length field)
 4583inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32Copy& row) {
 4584    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32Copy&>(row).length));
 4585}
 4586
 4587// --- fasttest.I32Copy..Init
 4588// Set all fields to initial values.
 4589inline void fasttest::I32Copy_Init(fasttest::I32Copy& parent) {
 4590    parent.length = u32(ssizeof(parent) + (0));
 4591    parent.id = u32(49);
 4592    parent.Value49 = i32(49);
 4593}
 4594inline fasttest::I32CopyNull::I32CopyNull() {
 4595    fasttest::I32CopyNull_Init(*this);
 4596}
 4597
 4598
 4599// --- fasttest.I32CopyNull.base.Castdown
 4600// Check if fasttest::TemplateHeader is an instance of I32CopyNull by checking the type field
 4601// If it is, return the pointer of target type.
 4602// Additionally, check if the length field permits valid instance of I32CopyNull.
 4603// If not successful, quietly return NULL.
 4604inline fasttest::I32CopyNull* fasttest::I32CopyNull_Castdown(fasttest::TemplateHeader &hdr) {
 4605    bool cond = hdr.id == (51);
 4606    cond &= i32(hdr.length) >= ssizeof(fasttest::I32CopyNull);
 4607    return cond ? reinterpret_cast<fasttest::I32CopyNull*>(&hdr) : NULL;
 4608}
 4609
 4610// --- fasttest.I32CopyNull.base.Castbase
 4611inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32CopyNull& parent) {
 4612    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 4613}
 4614
 4615// --- fasttest.I32CopyNull.pmask.N
 4616// Return constant 1
 4617inline int fasttest::pmask_N(fasttest::I32CopyNull& parent) {
 4618    (void)parent;
 4619    return 1;
 4620}
 4621
 4622// --- fasttest.I32CopyNull.pmask.qFind
 4623// Access value
 4624inline u32& fasttest::pmask_qFind(fasttest::I32CopyNull& parent, int) {
 4625    return parent.pmask;
 4626}
 4627
 4628// --- fasttest.I32CopyNull.pmask.NBits
 4629// Get max # of bits in the bitset
 4630// Return max. number of bits supported by array
 4631inline int fasttest::pmask_Nbits(fasttest::I32CopyNull& parent) {
 4632    return pmask_N(parent) * 32;
 4633}
 4634
 4635// --- fasttest.I32CopyNull.pmask.qGetBit
 4636// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 4637inline bool fasttest::pmask_qGetBit(fasttest::I32CopyNull& parent, u32 bit_idx) {
 4638    u64 elem_idx = bit_idx >> 5;
 4639    u64 shift = bit_idx & 31;
 4640    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4641    return bool((elem >> shift) & 1); // extract bit
 4642}
 4643
 4644// --- fasttest.I32CopyNull.pmask.GetBit
 4645// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 4646inline bool fasttest::pmask_GetBit(fasttest::I32CopyNull& parent, u32 bit_idx) {
 4647    u64 elem_idx = bit_idx >> 5;
 4648    u64 shift = bit_idx & 31;
 4649    bool ret = false;
 4650    u64 lim = pmask_N(parent);
 4651    if (elem_idx < lim) {
 4652        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4653        ret = (elem >> shift) & 1;                 // extract bit
 4654    }
 4655    return ret;
 4656}
 4657
 4658// --- fasttest.I32CopyNull.pmask.BitsEmptyQ
 4659// Check if all the bits in the bitset are equal to zero
 4660inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32CopyNull& parent) {
 4661    bool retval = true;
 4662    u64 n = pmask_N(parent);
 4663    for (u64 i = 0; i < n; i++) {
 4664        if (pmask_qFind(parent,i) != 0) {
 4665            retval = false;
 4666            break;
 4667        }
 4668    }
 4669    return retval;
 4670}
 4671
 4672// --- fasttest.I32CopyNull.pmask.Sum1s
 4673inline u64 fasttest::pmask_Sum1s(fasttest::I32CopyNull& parent) {
 4674    u64 sum = 0;
 4675    u64 n = pmask_N(parent);
 4676    for (u64 i = 0; i < n; i++) {
 4677        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 4678    }
 4679    return sum;
 4680}
 4681
 4682// --- fasttest.I32CopyNull.pmask.qClearBit
 4683// Clear bit # BIT_IDX in bit set. No bounds checking
 4684inline void fasttest::pmask_qClearBit(fasttest::I32CopyNull& parent, u32 bit_idx) {
 4685    u64 elem_idx = bit_idx >> 5;
 4686    u64 shift = bit_idx & 31;
 4687    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4688    elem = elem & ~(u32(1) << shift); // clear bit
 4689}
 4690
 4691// --- fasttest.I32CopyNull.pmask.ClearBit
 4692// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 4693inline void fasttest::pmask_ClearBit(fasttest::I32CopyNull& parent, u32 bit_idx) {
 4694    u64 elem_idx = bit_idx >> 5;
 4695    u64 shift = bit_idx & 31;
 4696    u64 lim = pmask_N(parent);
 4697    if (elem_idx < lim) {
 4698        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4699        elem = elem & ~(u32(1) << shift); // clear bit
 4700    }
 4701}
 4702
 4703// --- fasttest.I32CopyNull.pmask.qSetBit
 4704// Set bit # BIT_IDX in bit set. No bounds checking
 4705inline void fasttest::pmask_qSetBit(fasttest::I32CopyNull& parent, u32 bit_idx) {
 4706    u64 elem_idx = bit_idx >> 5;
 4707    u64 shift = bit_idx & 31;
 4708    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4709    elem = elem | (u32(1) << shift); // set bit
 4710}
 4711
 4712// --- fasttest.I32CopyNull.pmask.SetBit
 4713// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 4714inline void fasttest::pmask_SetBit(fasttest::I32CopyNull& parent, u32 bit_idx) {
 4715    u64 elem_idx = bit_idx >> 5;
 4716    u64 shift = bit_idx & 31;
 4717    u64 lim = pmask_N(parent);
 4718    if (elem_idx < lim) {
 4719        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4720        elem = elem | (u32(1) << shift); // set bit
 4721    }
 4722}
 4723
 4724// --- fasttest.I32CopyNull.pmask.qSetBitVal
 4725// Set bit # BIT_IDX in bit set. No bounds checking
 4726inline void fasttest::pmask_qSetBitVal(fasttest::I32CopyNull& parent, u32 bit_idx, bool val) {
 4727    u64 elem_idx = bit_idx >> 5;
 4728    u64 shift = bit_idx & 31;
 4729    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4730    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 4731}
 4732
 4733// --- fasttest.I32CopyNull.pmask.qOrBitVal
 4734// Or bit # BIT_IDX in bit set. No bounds checking
 4735inline void fasttest::pmask_qOrBitVal(fasttest::I32CopyNull& parent, u32 bit_idx, bool val) {
 4736    u64 elem_idx = bit_idx >> 5;
 4737    u64 shift = bit_idx & 31;
 4738    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4739    elem = elem | (u32(val) << shift); // Or in val into elem
 4740}
 4741
 4742// --- fasttest.I32CopyNull.pmask.ClearBitsAll
 4743// Set all bits of array to zero.
 4744// Note: this does not change what NBits will return.
 4745inline void fasttest::pmask_ClearBitsAll(fasttest::I32CopyNull& parent) {
 4746    u64 n = pmask_N(parent);
 4747    for (u64 i = 0; i < n; i++) {
 4748        pmask_qFind(parent, i) = 0;
 4749    }
 4750}
 4751
 4752// --- fasttest.I32CopyNull.pmask.ClearBits
 4753// Zero in PARENT any bits that are set in RHS.
 4754inline void fasttest::pmask_ClearBits(fasttest::I32CopyNull& parent, fasttest::I32CopyNull &rhs) {
 4755    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 4756    for (u64 i = 0; i < n; i++) {
 4757        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 4758    }
 4759}
 4760
 4761// --- fasttest.I32CopyNull.pmask.OrBits
 4762// Set PARENT to union of two bitsets.
 4763// (This function is not named Set.. to avoid triple entendre).
 4764inline void fasttest::pmask_OrBits(fasttest::I32CopyNull& parent, fasttest::I32CopyNull &rhs) {
 4765    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 4766    for (u64 i = 0; i < n; i++) {
 4767        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 4768    }
 4769}
 4770
 4771// --- fasttest.I32CopyNull.pmask.Sup
 4772// Return smallest number N such that indexes of all 1 bits are below N
 4773inline i32 fasttest::pmask_Sup(fasttest::I32CopyNull& parent) {
 4774    u64 lim = pmask_N(parent);
 4775    i32 ret = 0;
 4776    for (int i = lim-1; i >= 0; i--) {
 4777        u32 &val = pmask_qFind(parent, i);
 4778        if (val) {
 4779            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 4780            ret = i * 32 + bitidx;
 4781            break;
 4782        }
 4783    }
 4784    return ret;
 4785}
 4786
 4787// --- fasttest.I32CopyNull.Value51.PresentQ
 4788// Return true if the field is marked in the presence mask
 4789inline bool fasttest::Value51_PresentQ(fasttest::I32CopyNull& parent) {
 4790    return pmask_qGetBit(parent, 0);
 4791}
 4792
 4793// --- fasttest.I32CopyNull.Value51.SetPresent
 4794// Set presence bit for this field in the pmask
 4795inline void fasttest::Value51_SetPresent(fasttest::I32CopyNull& parent) {
 4796    pmask_qSetBit(parent, 0); // mark presence in pmask
 4797}
 4798
 4799// --- fasttest.I32CopyNull.Value51.Present_GetBit
 4800// Return field's bit number in the pmask
 4801inline int fasttest::Value51_Present_GetBit(fasttest::I32CopyNull& parent) {
 4802    int retval = 0;
 4803    (void)parent;//only to avoid -Wunused-parameter
 4804    return retval;
 4805}
 4806
 4807// --- fasttest.I32CopyNull.Value51.Set
 4808inline void fasttest::Value51_Set(fasttest::I32CopyNull& parent, i32 rhs) {
 4809    parent.Value51 = rhs;
 4810    pmask_qSetBit(parent, 0); // mark presence in pmask
 4811}
 4812
 4813// --- fasttest.I32CopyNull.pmask_bitcurs.Reset
 4814inline void fasttest::I32CopyNull_pmask_bitcurs_Reset(I32CopyNull_pmask_bitcurs &curs, fasttest::I32CopyNull &parent) {
 4815    curs.elems = &pmask_qFind(parent,0);
 4816    curs.n_elems = pmask_N(parent);
 4817    curs.bit = -1;
 4818    I32CopyNull_pmask_bitcurs_Next(curs);
 4819}
 4820
 4821// --- fasttest.I32CopyNull.pmask_bitcurs.ValidQ
 4822// cursor points to valid item
 4823inline bool fasttest::I32CopyNull_pmask_bitcurs_ValidQ(I32CopyNull_pmask_bitcurs &curs) {
 4824    return curs.bit < curs.n_elems*32;
 4825}
 4826
 4827// --- fasttest.I32CopyNull.pmask_bitcurs.Access
 4828// item access
 4829inline int& fasttest::I32CopyNull_pmask_bitcurs_Access(I32CopyNull_pmask_bitcurs &curs) {
 4830    return curs.bit;
 4831}
 4832
 4833// --- fasttest.I32CopyNull..GetMsgLength
 4834// Message length (uses length field)
 4835inline i32 fasttest::GetMsgLength(const fasttest::I32CopyNull& parent) {
 4836    return i32(const_cast<fasttest::I32CopyNull&>(parent).length);
 4837}
 4838
 4839// --- fasttest.I32CopyNull..GetMsgMemptr
 4840// Memptr encompassing the message (uses length field)
 4841inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32CopyNull& row) {
 4842    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32CopyNull&>(row).length));
 4843}
 4844
 4845// --- fasttest.I32CopyNull..Init
 4846// Set all fields to initial values.
 4847inline void fasttest::I32CopyNull_Init(fasttest::I32CopyNull& parent) {
 4848    parent.length = u32(ssizeof(parent) + (0));
 4849    parent.id = u32(51);
 4850    parent.pmask = u32(0);
 4851    parent.Value51 = i32(0);
 4852}
 4853inline fasttest::I32CopyOpt::I32CopyOpt() {
 4854    fasttest::I32CopyOpt_Init(*this);
 4855}
 4856
 4857
 4858// --- fasttest.I32CopyOpt.base.Castdown
 4859// Check if fasttest::TemplateHeader is an instance of I32CopyOpt by checking the type field
 4860// If it is, return the pointer of target type.
 4861// Additionally, check if the length field permits valid instance of I32CopyOpt.
 4862// If not successful, quietly return NULL.
 4863inline fasttest::I32CopyOpt* fasttest::I32CopyOpt_Castdown(fasttest::TemplateHeader &hdr) {
 4864    bool cond = hdr.id == (50);
 4865    cond &= i32(hdr.length) >= ssizeof(fasttest::I32CopyOpt);
 4866    return cond ? reinterpret_cast<fasttest::I32CopyOpt*>(&hdr) : NULL;
 4867}
 4868
 4869// --- fasttest.I32CopyOpt.base.Castbase
 4870inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32CopyOpt& parent) {
 4871    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 4872}
 4873
 4874// --- fasttest.I32CopyOpt.pmask.N
 4875// Return constant 1
 4876inline int fasttest::pmask_N(fasttest::I32CopyOpt& parent) {
 4877    (void)parent;
 4878    return 1;
 4879}
 4880
 4881// --- fasttest.I32CopyOpt.pmask.qFind
 4882// Access value
 4883inline u32& fasttest::pmask_qFind(fasttest::I32CopyOpt& parent, int) {
 4884    return parent.pmask;
 4885}
 4886
 4887// --- fasttest.I32CopyOpt.pmask.NBits
 4888// Get max # of bits in the bitset
 4889// Return max. number of bits supported by array
 4890inline int fasttest::pmask_Nbits(fasttest::I32CopyOpt& parent) {
 4891    return pmask_N(parent) * 32;
 4892}
 4893
 4894// --- fasttest.I32CopyOpt.pmask.qGetBit
 4895// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 4896inline bool fasttest::pmask_qGetBit(fasttest::I32CopyOpt& parent, u32 bit_idx) {
 4897    u64 elem_idx = bit_idx >> 5;
 4898    u64 shift = bit_idx & 31;
 4899    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4900    return bool((elem >> shift) & 1); // extract bit
 4901}
 4902
 4903// --- fasttest.I32CopyOpt.pmask.GetBit
 4904// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 4905inline bool fasttest::pmask_GetBit(fasttest::I32CopyOpt& parent, u32 bit_idx) {
 4906    u64 elem_idx = bit_idx >> 5;
 4907    u64 shift = bit_idx & 31;
 4908    bool ret = false;
 4909    u64 lim = pmask_N(parent);
 4910    if (elem_idx < lim) {
 4911        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 4912        ret = (elem >> shift) & 1;                 // extract bit
 4913    }
 4914    return ret;
 4915}
 4916
 4917// --- fasttest.I32CopyOpt.pmask.BitsEmptyQ
 4918// Check if all the bits in the bitset are equal to zero
 4919inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32CopyOpt& parent) {
 4920    bool retval = true;
 4921    u64 n = pmask_N(parent);
 4922    for (u64 i = 0; i < n; i++) {
 4923        if (pmask_qFind(parent,i) != 0) {
 4924            retval = false;
 4925            break;
 4926        }
 4927    }
 4928    return retval;
 4929}
 4930
 4931// --- fasttest.I32CopyOpt.pmask.Sum1s
 4932inline u64 fasttest::pmask_Sum1s(fasttest::I32CopyOpt& parent) {
 4933    u64 sum = 0;
 4934    u64 n = pmask_N(parent);
 4935    for (u64 i = 0; i < n; i++) {
 4936        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 4937    }
 4938    return sum;
 4939}
 4940
 4941// --- fasttest.I32CopyOpt.pmask.qClearBit
 4942// Clear bit # BIT_IDX in bit set. No bounds checking
 4943inline void fasttest::pmask_qClearBit(fasttest::I32CopyOpt& parent, u32 bit_idx) {
 4944    u64 elem_idx = bit_idx >> 5;
 4945    u64 shift = bit_idx & 31;
 4946    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4947    elem = elem & ~(u32(1) << shift); // clear bit
 4948}
 4949
 4950// --- fasttest.I32CopyOpt.pmask.ClearBit
 4951// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 4952inline void fasttest::pmask_ClearBit(fasttest::I32CopyOpt& parent, u32 bit_idx) {
 4953    u64 elem_idx = bit_idx >> 5;
 4954    u64 shift = bit_idx & 31;
 4955    u64 lim = pmask_N(parent);
 4956    if (elem_idx < lim) {
 4957        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4958        elem = elem & ~(u32(1) << shift); // clear bit
 4959    }
 4960}
 4961
 4962// --- fasttest.I32CopyOpt.pmask.qSetBit
 4963// Set bit # BIT_IDX in bit set. No bounds checking
 4964inline void fasttest::pmask_qSetBit(fasttest::I32CopyOpt& parent, u32 bit_idx) {
 4965    u64 elem_idx = bit_idx >> 5;
 4966    u64 shift = bit_idx & 31;
 4967    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4968    elem = elem | (u32(1) << shift); // set bit
 4969}
 4970
 4971// --- fasttest.I32CopyOpt.pmask.SetBit
 4972// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 4973inline void fasttest::pmask_SetBit(fasttest::I32CopyOpt& parent, u32 bit_idx) {
 4974    u64 elem_idx = bit_idx >> 5;
 4975    u64 shift = bit_idx & 31;
 4976    u64 lim = pmask_N(parent);
 4977    if (elem_idx < lim) {
 4978        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4979        elem = elem | (u32(1) << shift); // set bit
 4980    }
 4981}
 4982
 4983// --- fasttest.I32CopyOpt.pmask.qSetBitVal
 4984// Set bit # BIT_IDX in bit set. No bounds checking
 4985inline void fasttest::pmask_qSetBitVal(fasttest::I32CopyOpt& parent, u32 bit_idx, bool val) {
 4986    u64 elem_idx = bit_idx >> 5;
 4987    u64 shift = bit_idx & 31;
 4988    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4989    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 4990}
 4991
 4992// --- fasttest.I32CopyOpt.pmask.qOrBitVal
 4993// Or bit # BIT_IDX in bit set. No bounds checking
 4994inline void fasttest::pmask_qOrBitVal(fasttest::I32CopyOpt& parent, u32 bit_idx, bool val) {
 4995    u64 elem_idx = bit_idx >> 5;
 4996    u64 shift = bit_idx & 31;
 4997    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 4998    elem = elem | (u32(val) << shift); // Or in val into elem
 4999}
 5000
 5001// --- fasttest.I32CopyOpt.pmask.ClearBitsAll
 5002// Set all bits of array to zero.
 5003// Note: this does not change what NBits will return.
 5004inline void fasttest::pmask_ClearBitsAll(fasttest::I32CopyOpt& parent) {
 5005    u64 n = pmask_N(parent);
 5006    for (u64 i = 0; i < n; i++) {
 5007        pmask_qFind(parent, i) = 0;
 5008    }
 5009}
 5010
 5011// --- fasttest.I32CopyOpt.pmask.ClearBits
 5012// Zero in PARENT any bits that are set in RHS.
 5013inline void fasttest::pmask_ClearBits(fasttest::I32CopyOpt& parent, fasttest::I32CopyOpt &rhs) {
 5014    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5015    for (u64 i = 0; i < n; i++) {
 5016        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 5017    }
 5018}
 5019
 5020// --- fasttest.I32CopyOpt.pmask.OrBits
 5021// Set PARENT to union of two bitsets.
 5022// (This function is not named Set.. to avoid triple entendre).
 5023inline void fasttest::pmask_OrBits(fasttest::I32CopyOpt& parent, fasttest::I32CopyOpt &rhs) {
 5024    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5025    for (u64 i = 0; i < n; i++) {
 5026        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 5027    }
 5028}
 5029
 5030// --- fasttest.I32CopyOpt.pmask.Sup
 5031// Return smallest number N such that indexes of all 1 bits are below N
 5032inline i32 fasttest::pmask_Sup(fasttest::I32CopyOpt& parent) {
 5033    u64 lim = pmask_N(parent);
 5034    i32 ret = 0;
 5035    for (int i = lim-1; i >= 0; i--) {
 5036        u32 &val = pmask_qFind(parent, i);
 5037        if (val) {
 5038            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 5039            ret = i * 32 + bitidx;
 5040            break;
 5041        }
 5042    }
 5043    return ret;
 5044}
 5045
 5046// --- fasttest.I32CopyOpt.Value50.PresentQ
 5047// Return true if the field is marked in the presence mask
 5048inline bool fasttest::Value50_PresentQ(fasttest::I32CopyOpt& parent) {
 5049    return pmask_qGetBit(parent, 0);
 5050}
 5051
 5052// --- fasttest.I32CopyOpt.Value50.SetPresent
 5053// Set presence bit for this field in the pmask
 5054inline void fasttest::Value50_SetPresent(fasttest::I32CopyOpt& parent) {
 5055    pmask_qSetBit(parent, 0); // mark presence in pmask
 5056}
 5057
 5058// --- fasttest.I32CopyOpt.Value50.Present_GetBit
 5059// Return field's bit number in the pmask
 5060inline int fasttest::Value50_Present_GetBit(fasttest::I32CopyOpt& parent) {
 5061    int retval = 0;
 5062    (void)parent;//only to avoid -Wunused-parameter
 5063    return retval;
 5064}
 5065
 5066// --- fasttest.I32CopyOpt.Value50.Set
 5067inline void fasttest::Value50_Set(fasttest::I32CopyOpt& parent, i32 rhs) {
 5068    parent.Value50 = rhs;
 5069    pmask_qSetBit(parent, 0); // mark presence in pmask
 5070}
 5071
 5072// --- fasttest.I32CopyOpt.pmask_bitcurs.Reset
 5073inline void fasttest::I32CopyOpt_pmask_bitcurs_Reset(I32CopyOpt_pmask_bitcurs &curs, fasttest::I32CopyOpt &parent) {
 5074    curs.elems = &pmask_qFind(parent,0);
 5075    curs.n_elems = pmask_N(parent);
 5076    curs.bit = -1;
 5077    I32CopyOpt_pmask_bitcurs_Next(curs);
 5078}
 5079
 5080// --- fasttest.I32CopyOpt.pmask_bitcurs.ValidQ
 5081// cursor points to valid item
 5082inline bool fasttest::I32CopyOpt_pmask_bitcurs_ValidQ(I32CopyOpt_pmask_bitcurs &curs) {
 5083    return curs.bit < curs.n_elems*32;
 5084}
 5085
 5086// --- fasttest.I32CopyOpt.pmask_bitcurs.Access
 5087// item access
 5088inline int& fasttest::I32CopyOpt_pmask_bitcurs_Access(I32CopyOpt_pmask_bitcurs &curs) {
 5089    return curs.bit;
 5090}
 5091
 5092// --- fasttest.I32CopyOpt..GetMsgLength
 5093// Message length (uses length field)
 5094inline i32 fasttest::GetMsgLength(const fasttest::I32CopyOpt& parent) {
 5095    return i32(const_cast<fasttest::I32CopyOpt&>(parent).length);
 5096}
 5097
 5098// --- fasttest.I32CopyOpt..GetMsgMemptr
 5099// Memptr encompassing the message (uses length field)
 5100inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32CopyOpt& row) {
 5101    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32CopyOpt&>(row).length));
 5102}
 5103
 5104// --- fasttest.I32CopyOpt..Init
 5105// Set all fields to initial values.
 5106inline void fasttest::I32CopyOpt_Init(fasttest::I32CopyOpt& parent) {
 5107    parent.length = u32(ssizeof(parent) + (0));
 5108    parent.id = u32(50);
 5109    parent.pmask = u32(0);
 5110    parent.Value50 = i32(50);
 5111}
 5112inline fasttest::I32Delta::I32Delta() {
 5113    fasttest::I32Delta_Init(*this);
 5114}
 5115
 5116
 5117// --- fasttest.I32Delta.base.Castdown
 5118// Check if fasttest::TemplateHeader is an instance of I32Delta by checking the type field
 5119// If it is, return the pointer of target type.
 5120// Additionally, check if the length field permits valid instance of I32Delta.
 5121// If not successful, quietly return NULL.
 5122inline fasttest::I32Delta* fasttest::I32Delta_Castdown(fasttest::TemplateHeader &hdr) {
 5123    bool cond = hdr.id == (65);
 5124    cond &= i32(hdr.length) >= ssizeof(fasttest::I32Delta);
 5125    return cond ? reinterpret_cast<fasttest::I32Delta*>(&hdr) : NULL;
 5126}
 5127
 5128// --- fasttest.I32Delta.base.Castbase
 5129inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32Delta& parent) {
 5130    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 5131}
 5132
 5133// --- fasttest.I32Delta..GetMsgLength
 5134// Message length (uses length field)
 5135inline i32 fasttest::GetMsgLength(const fasttest::I32Delta& parent) {
 5136    return i32(const_cast<fasttest::I32Delta&>(parent).length);
 5137}
 5138
 5139// --- fasttest.I32Delta..GetMsgMemptr
 5140// Memptr encompassing the message (uses length field)
 5141inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32Delta& row) {
 5142    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32Delta&>(row).length));
 5143}
 5144
 5145// --- fasttest.I32Delta..Init
 5146// Set all fields to initial values.
 5147inline void fasttest::I32Delta_Init(fasttest::I32Delta& parent) {
 5148    parent.length = u32(ssizeof(parent) + (0));
 5149    parent.id = u32(65);
 5150    parent.Value65 = i32(65);
 5151}
 5152inline fasttest::I32DeltaImpl::I32DeltaImpl() {
 5153    fasttest::I32DeltaImpl_Init(*this);
 5154}
 5155
 5156
 5157// --- fasttest.I32DeltaImpl.base.Castdown
 5158// Check if fasttest::TemplateHeader is an instance of I32DeltaImpl by checking the type field
 5159// If it is, return the pointer of target type.
 5160// Additionally, check if the length field permits valid instance of I32DeltaImpl.
 5161// If not successful, quietly return NULL.
 5162inline fasttest::I32DeltaImpl* fasttest::I32DeltaImpl_Castdown(fasttest::TemplateHeader &hdr) {
 5163    bool cond = hdr.id == (66);
 5164    cond &= i32(hdr.length) >= ssizeof(fasttest::I32DeltaImpl);
 5165    return cond ? reinterpret_cast<fasttest::I32DeltaImpl*>(&hdr) : NULL;
 5166}
 5167
 5168// --- fasttest.I32DeltaImpl.base.Castbase
 5169inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32DeltaImpl& parent) {
 5170    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 5171}
 5172
 5173// --- fasttest.I32DeltaImpl..GetMsgLength
 5174// Message length (uses length field)
 5175inline i32 fasttest::GetMsgLength(const fasttest::I32DeltaImpl& parent) {
 5176    return i32(const_cast<fasttest::I32DeltaImpl&>(parent).length);
 5177}
 5178
 5179// --- fasttest.I32DeltaImpl..GetMsgMemptr
 5180// Memptr encompassing the message (uses length field)
 5181inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32DeltaImpl& row) {
 5182    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32DeltaImpl&>(row).length));
 5183}
 5184
 5185// --- fasttest.I32DeltaImpl..Init
 5186// Set all fields to initial values.
 5187inline void fasttest::I32DeltaImpl_Init(fasttest::I32DeltaImpl& parent) {
 5188    parent.length = u32(ssizeof(parent) + (0));
 5189    parent.id = u32(66);
 5190    parent.Value66 = i32(0);
 5191}
 5192inline fasttest::I32DeltaNull::I32DeltaNull() {
 5193    fasttest::I32DeltaNull_Init(*this);
 5194}
 5195
 5196
 5197// --- fasttest.I32DeltaNull.base.Castdown
 5198// Check if fasttest::TemplateHeader is an instance of I32DeltaNull by checking the type field
 5199// If it is, return the pointer of target type.
 5200// Additionally, check if the length field permits valid instance of I32DeltaNull.
 5201// If not successful, quietly return NULL.
 5202inline fasttest::I32DeltaNull* fasttest::I32DeltaNull_Castdown(fasttest::TemplateHeader &hdr) {
 5203    bool cond = hdr.id == (68);
 5204    cond &= i32(hdr.length) >= ssizeof(fasttest::I32DeltaNull);
 5205    return cond ? reinterpret_cast<fasttest::I32DeltaNull*>(&hdr) : NULL;
 5206}
 5207
 5208// --- fasttest.I32DeltaNull.base.Castbase
 5209inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32DeltaNull& parent) {
 5210    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 5211}
 5212
 5213// --- fasttest.I32DeltaNull.pmask.N
 5214// Return constant 1
 5215inline int fasttest::pmask_N(fasttest::I32DeltaNull& parent) {
 5216    (void)parent;
 5217    return 1;
 5218}
 5219
 5220// --- fasttest.I32DeltaNull.pmask.qFind
 5221// Access value
 5222inline u32& fasttest::pmask_qFind(fasttest::I32DeltaNull& parent, int) {
 5223    return parent.pmask;
 5224}
 5225
 5226// --- fasttest.I32DeltaNull.pmask.NBits
 5227// Get max # of bits in the bitset
 5228// Return max. number of bits supported by array
 5229inline int fasttest::pmask_Nbits(fasttest::I32DeltaNull& parent) {
 5230    return pmask_N(parent) * 32;
 5231}
 5232
 5233// --- fasttest.I32DeltaNull.pmask.qGetBit
 5234// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 5235inline bool fasttest::pmask_qGetBit(fasttest::I32DeltaNull& parent, u32 bit_idx) {
 5236    u64 elem_idx = bit_idx >> 5;
 5237    u64 shift = bit_idx & 31;
 5238    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 5239    return bool((elem >> shift) & 1); // extract bit
 5240}
 5241
 5242// --- fasttest.I32DeltaNull.pmask.GetBit
 5243// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 5244inline bool fasttest::pmask_GetBit(fasttest::I32DeltaNull& parent, u32 bit_idx) {
 5245    u64 elem_idx = bit_idx >> 5;
 5246    u64 shift = bit_idx & 31;
 5247    bool ret = false;
 5248    u64 lim = pmask_N(parent);
 5249    if (elem_idx < lim) {
 5250        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 5251        ret = (elem >> shift) & 1;                 // extract bit
 5252    }
 5253    return ret;
 5254}
 5255
 5256// --- fasttest.I32DeltaNull.pmask.BitsEmptyQ
 5257// Check if all the bits in the bitset are equal to zero
 5258inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32DeltaNull& parent) {
 5259    bool retval = true;
 5260    u64 n = pmask_N(parent);
 5261    for (u64 i = 0; i < n; i++) {
 5262        if (pmask_qFind(parent,i) != 0) {
 5263            retval = false;
 5264            break;
 5265        }
 5266    }
 5267    return retval;
 5268}
 5269
 5270// --- fasttest.I32DeltaNull.pmask.Sum1s
 5271inline u64 fasttest::pmask_Sum1s(fasttest::I32DeltaNull& parent) {
 5272    u64 sum = 0;
 5273    u64 n = pmask_N(parent);
 5274    for (u64 i = 0; i < n; i++) {
 5275        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 5276    }
 5277    return sum;
 5278}
 5279
 5280// --- fasttest.I32DeltaNull.pmask.qClearBit
 5281// Clear bit # BIT_IDX in bit set. No bounds checking
 5282inline void fasttest::pmask_qClearBit(fasttest::I32DeltaNull& parent, u32 bit_idx) {
 5283    u64 elem_idx = bit_idx >> 5;
 5284    u64 shift = bit_idx & 31;
 5285    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5286    elem = elem & ~(u32(1) << shift); // clear bit
 5287}
 5288
 5289// --- fasttest.I32DeltaNull.pmask.ClearBit
 5290// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 5291inline void fasttest::pmask_ClearBit(fasttest::I32DeltaNull& parent, u32 bit_idx) {
 5292    u64 elem_idx = bit_idx >> 5;
 5293    u64 shift = bit_idx & 31;
 5294    u64 lim = pmask_N(parent);
 5295    if (elem_idx < lim) {
 5296        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5297        elem = elem & ~(u32(1) << shift); // clear bit
 5298    }
 5299}
 5300
 5301// --- fasttest.I32DeltaNull.pmask.qSetBit
 5302// Set bit # BIT_IDX in bit set. No bounds checking
 5303inline void fasttest::pmask_qSetBit(fasttest::I32DeltaNull& parent, u32 bit_idx) {
 5304    u64 elem_idx = bit_idx >> 5;
 5305    u64 shift = bit_idx & 31;
 5306    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5307    elem = elem | (u32(1) << shift); // set bit
 5308}
 5309
 5310// --- fasttest.I32DeltaNull.pmask.SetBit
 5311// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 5312inline void fasttest::pmask_SetBit(fasttest::I32DeltaNull& parent, u32 bit_idx) {
 5313    u64 elem_idx = bit_idx >> 5;
 5314    u64 shift = bit_idx & 31;
 5315    u64 lim = pmask_N(parent);
 5316    if (elem_idx < lim) {
 5317        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5318        elem = elem | (u32(1) << shift); // set bit
 5319    }
 5320}
 5321
 5322// --- fasttest.I32DeltaNull.pmask.qSetBitVal
 5323// Set bit # BIT_IDX in bit set. No bounds checking
 5324inline void fasttest::pmask_qSetBitVal(fasttest::I32DeltaNull& parent, u32 bit_idx, bool val) {
 5325    u64 elem_idx = bit_idx >> 5;
 5326    u64 shift = bit_idx & 31;
 5327    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5328    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 5329}
 5330
 5331// --- fasttest.I32DeltaNull.pmask.qOrBitVal
 5332// Or bit # BIT_IDX in bit set. No bounds checking
 5333inline void fasttest::pmask_qOrBitVal(fasttest::I32DeltaNull& parent, u32 bit_idx, bool val) {
 5334    u64 elem_idx = bit_idx >> 5;
 5335    u64 shift = bit_idx & 31;
 5336    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5337    elem = elem | (u32(val) << shift); // Or in val into elem
 5338}
 5339
 5340// --- fasttest.I32DeltaNull.pmask.ClearBitsAll
 5341// Set all bits of array to zero.
 5342// Note: this does not change what NBits will return.
 5343inline void fasttest::pmask_ClearBitsAll(fasttest::I32DeltaNull& parent) {
 5344    u64 n = pmask_N(parent);
 5345    for (u64 i = 0; i < n; i++) {
 5346        pmask_qFind(parent, i) = 0;
 5347    }
 5348}
 5349
 5350// --- fasttest.I32DeltaNull.pmask.ClearBits
 5351// Zero in PARENT any bits that are set in RHS.
 5352inline void fasttest::pmask_ClearBits(fasttest::I32DeltaNull& parent, fasttest::I32DeltaNull &rhs) {
 5353    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5354    for (u64 i = 0; i < n; i++) {
 5355        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 5356    }
 5357}
 5358
 5359// --- fasttest.I32DeltaNull.pmask.OrBits
 5360// Set PARENT to union of two bitsets.
 5361// (This function is not named Set.. to avoid triple entendre).
 5362inline void fasttest::pmask_OrBits(fasttest::I32DeltaNull& parent, fasttest::I32DeltaNull &rhs) {
 5363    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5364    for (u64 i = 0; i < n; i++) {
 5365        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 5366    }
 5367}
 5368
 5369// --- fasttest.I32DeltaNull.pmask.Sup
 5370// Return smallest number N such that indexes of all 1 bits are below N
 5371inline i32 fasttest::pmask_Sup(fasttest::I32DeltaNull& parent) {
 5372    u64 lim = pmask_N(parent);
 5373    i32 ret = 0;
 5374    for (int i = lim-1; i >= 0; i--) {
 5375        u32 &val = pmask_qFind(parent, i);
 5376        if (val) {
 5377            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 5378            ret = i * 32 + bitidx;
 5379            break;
 5380        }
 5381    }
 5382    return ret;
 5383}
 5384
 5385// --- fasttest.I32DeltaNull.Value68.PresentQ
 5386// Return true if the field is marked in the presence mask
 5387inline bool fasttest::Value68_PresentQ(fasttest::I32DeltaNull& parent) {
 5388    return pmask_qGetBit(parent, 0);
 5389}
 5390
 5391// --- fasttest.I32DeltaNull.Value68.SetPresent
 5392// Set presence bit for this field in the pmask
 5393inline void fasttest::Value68_SetPresent(fasttest::I32DeltaNull& parent) {
 5394    pmask_qSetBit(parent, 0); // mark presence in pmask
 5395}
 5396
 5397// --- fasttest.I32DeltaNull.Value68.Present_GetBit
 5398// Return field's bit number in the pmask
 5399inline int fasttest::Value68_Present_GetBit(fasttest::I32DeltaNull& parent) {
 5400    int retval = 0;
 5401    (void)parent;//only to avoid -Wunused-parameter
 5402    return retval;
 5403}
 5404
 5405// --- fasttest.I32DeltaNull.Value68.Set
 5406inline void fasttest::Value68_Set(fasttest::I32DeltaNull& parent, i32 rhs) {
 5407    parent.Value68 = rhs;
 5408    pmask_qSetBit(parent, 0); // mark presence in pmask
 5409}
 5410
 5411// --- fasttest.I32DeltaNull.pmask_bitcurs.Reset
 5412inline void fasttest::I32DeltaNull_pmask_bitcurs_Reset(I32DeltaNull_pmask_bitcurs &curs, fasttest::I32DeltaNull &parent) {
 5413    curs.elems = &pmask_qFind(parent,0);
 5414    curs.n_elems = pmask_N(parent);
 5415    curs.bit = -1;
 5416    I32DeltaNull_pmask_bitcurs_Next(curs);
 5417}
 5418
 5419// --- fasttest.I32DeltaNull.pmask_bitcurs.ValidQ
 5420// cursor points to valid item
 5421inline bool fasttest::I32DeltaNull_pmask_bitcurs_ValidQ(I32DeltaNull_pmask_bitcurs &curs) {
 5422    return curs.bit < curs.n_elems*32;
 5423}
 5424
 5425// --- fasttest.I32DeltaNull.pmask_bitcurs.Access
 5426// item access
 5427inline int& fasttest::I32DeltaNull_pmask_bitcurs_Access(I32DeltaNull_pmask_bitcurs &curs) {
 5428    return curs.bit;
 5429}
 5430
 5431// --- fasttest.I32DeltaNull..GetMsgLength
 5432// Message length (uses length field)
 5433inline i32 fasttest::GetMsgLength(const fasttest::I32DeltaNull& parent) {
 5434    return i32(const_cast<fasttest::I32DeltaNull&>(parent).length);
 5435}
 5436
 5437// --- fasttest.I32DeltaNull..GetMsgMemptr
 5438// Memptr encompassing the message (uses length field)
 5439inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32DeltaNull& row) {
 5440    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32DeltaNull&>(row).length));
 5441}
 5442
 5443// --- fasttest.I32DeltaNull..Init
 5444// Set all fields to initial values.
 5445inline void fasttest::I32DeltaNull_Init(fasttest::I32DeltaNull& parent) {
 5446    parent.length = u32(ssizeof(parent) + (0));
 5447    parent.id = u32(68);
 5448    parent.pmask = u32(0);
 5449    parent.Value68 = i32(0);
 5450}
 5451inline fasttest::I32DeltaOpt::I32DeltaOpt() {
 5452    fasttest::I32DeltaOpt_Init(*this);
 5453}
 5454
 5455
 5456// --- fasttest.I32DeltaOpt.base.Castdown
 5457// Check if fasttest::TemplateHeader is an instance of I32DeltaOpt by checking the type field
 5458// If it is, return the pointer of target type.
 5459// Additionally, check if the length field permits valid instance of I32DeltaOpt.
 5460// If not successful, quietly return NULL.
 5461inline fasttest::I32DeltaOpt* fasttest::I32DeltaOpt_Castdown(fasttest::TemplateHeader &hdr) {
 5462    bool cond = hdr.id == (67);
 5463    cond &= i32(hdr.length) >= ssizeof(fasttest::I32DeltaOpt);
 5464    return cond ? reinterpret_cast<fasttest::I32DeltaOpt*>(&hdr) : NULL;
 5465}
 5466
 5467// --- fasttest.I32DeltaOpt.base.Castbase
 5468inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32DeltaOpt& parent) {
 5469    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 5470}
 5471
 5472// --- fasttest.I32DeltaOpt.pmask.N
 5473// Return constant 1
 5474inline int fasttest::pmask_N(fasttest::I32DeltaOpt& parent) {
 5475    (void)parent;
 5476    return 1;
 5477}
 5478
 5479// --- fasttest.I32DeltaOpt.pmask.qFind
 5480// Access value
 5481inline u32& fasttest::pmask_qFind(fasttest::I32DeltaOpt& parent, int) {
 5482    return parent.pmask;
 5483}
 5484
 5485// --- fasttest.I32DeltaOpt.pmask.NBits
 5486// Get max # of bits in the bitset
 5487// Return max. number of bits supported by array
 5488inline int fasttest::pmask_Nbits(fasttest::I32DeltaOpt& parent) {
 5489    return pmask_N(parent) * 32;
 5490}
 5491
 5492// --- fasttest.I32DeltaOpt.pmask.qGetBit
 5493// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 5494inline bool fasttest::pmask_qGetBit(fasttest::I32DeltaOpt& parent, u32 bit_idx) {
 5495    u64 elem_idx = bit_idx >> 5;
 5496    u64 shift = bit_idx & 31;
 5497    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 5498    return bool((elem >> shift) & 1); // extract bit
 5499}
 5500
 5501// --- fasttest.I32DeltaOpt.pmask.GetBit
 5502// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 5503inline bool fasttest::pmask_GetBit(fasttest::I32DeltaOpt& parent, u32 bit_idx) {
 5504    u64 elem_idx = bit_idx >> 5;
 5505    u64 shift = bit_idx & 31;
 5506    bool ret = false;
 5507    u64 lim = pmask_N(parent);
 5508    if (elem_idx < lim) {
 5509        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 5510        ret = (elem >> shift) & 1;                 // extract bit
 5511    }
 5512    return ret;
 5513}
 5514
 5515// --- fasttest.I32DeltaOpt.pmask.BitsEmptyQ
 5516// Check if all the bits in the bitset are equal to zero
 5517inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32DeltaOpt& parent) {
 5518    bool retval = true;
 5519    u64 n = pmask_N(parent);
 5520    for (u64 i = 0; i < n; i++) {
 5521        if (pmask_qFind(parent,i) != 0) {
 5522            retval = false;
 5523            break;
 5524        }
 5525    }
 5526    return retval;
 5527}
 5528
 5529// --- fasttest.I32DeltaOpt.pmask.Sum1s
 5530inline u64 fasttest::pmask_Sum1s(fasttest::I32DeltaOpt& parent) {
 5531    u64 sum = 0;
 5532    u64 n = pmask_N(parent);
 5533    for (u64 i = 0; i < n; i++) {
 5534        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 5535    }
 5536    return sum;
 5537}
 5538
 5539// --- fasttest.I32DeltaOpt.pmask.qClearBit
 5540// Clear bit # BIT_IDX in bit set. No bounds checking
 5541inline void fasttest::pmask_qClearBit(fasttest::I32DeltaOpt& parent, u32 bit_idx) {
 5542    u64 elem_idx = bit_idx >> 5;
 5543    u64 shift = bit_idx & 31;
 5544    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5545    elem = elem & ~(u32(1) << shift); // clear bit
 5546}
 5547
 5548// --- fasttest.I32DeltaOpt.pmask.ClearBit
 5549// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 5550inline void fasttest::pmask_ClearBit(fasttest::I32DeltaOpt& parent, u32 bit_idx) {
 5551    u64 elem_idx = bit_idx >> 5;
 5552    u64 shift = bit_idx & 31;
 5553    u64 lim = pmask_N(parent);
 5554    if (elem_idx < lim) {
 5555        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5556        elem = elem & ~(u32(1) << shift); // clear bit
 5557    }
 5558}
 5559
 5560// --- fasttest.I32DeltaOpt.pmask.qSetBit
 5561// Set bit # BIT_IDX in bit set. No bounds checking
 5562inline void fasttest::pmask_qSetBit(fasttest::I32DeltaOpt& parent, u32 bit_idx) {
 5563    u64 elem_idx = bit_idx >> 5;
 5564    u64 shift = bit_idx & 31;
 5565    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5566    elem = elem | (u32(1) << shift); // set bit
 5567}
 5568
 5569// --- fasttest.I32DeltaOpt.pmask.SetBit
 5570// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 5571inline void fasttest::pmask_SetBit(fasttest::I32DeltaOpt& parent, u32 bit_idx) {
 5572    u64 elem_idx = bit_idx >> 5;
 5573    u64 shift = bit_idx & 31;
 5574    u64 lim = pmask_N(parent);
 5575    if (elem_idx < lim) {
 5576        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5577        elem = elem | (u32(1) << shift); // set bit
 5578    }
 5579}
 5580
 5581// --- fasttest.I32DeltaOpt.pmask.qSetBitVal
 5582// Set bit # BIT_IDX in bit set. No bounds checking
 5583inline void fasttest::pmask_qSetBitVal(fasttest::I32DeltaOpt& parent, u32 bit_idx, bool val) {
 5584    u64 elem_idx = bit_idx >> 5;
 5585    u64 shift = bit_idx & 31;
 5586    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5587    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 5588}
 5589
 5590// --- fasttest.I32DeltaOpt.pmask.qOrBitVal
 5591// Or bit # BIT_IDX in bit set. No bounds checking
 5592inline void fasttest::pmask_qOrBitVal(fasttest::I32DeltaOpt& parent, u32 bit_idx, bool val) {
 5593    u64 elem_idx = bit_idx >> 5;
 5594    u64 shift = bit_idx & 31;
 5595    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5596    elem = elem | (u32(val) << shift); // Or in val into elem
 5597}
 5598
 5599// --- fasttest.I32DeltaOpt.pmask.ClearBitsAll
 5600// Set all bits of array to zero.
 5601// Note: this does not change what NBits will return.
 5602inline void fasttest::pmask_ClearBitsAll(fasttest::I32DeltaOpt& parent) {
 5603    u64 n = pmask_N(parent);
 5604    for (u64 i = 0; i < n; i++) {
 5605        pmask_qFind(parent, i) = 0;
 5606    }
 5607}
 5608
 5609// --- fasttest.I32DeltaOpt.pmask.ClearBits
 5610// Zero in PARENT any bits that are set in RHS.
 5611inline void fasttest::pmask_ClearBits(fasttest::I32DeltaOpt& parent, fasttest::I32DeltaOpt &rhs) {
 5612    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5613    for (u64 i = 0; i < n; i++) {
 5614        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 5615    }
 5616}
 5617
 5618// --- fasttest.I32DeltaOpt.pmask.OrBits
 5619// Set PARENT to union of two bitsets.
 5620// (This function is not named Set.. to avoid triple entendre).
 5621inline void fasttest::pmask_OrBits(fasttest::I32DeltaOpt& parent, fasttest::I32DeltaOpt &rhs) {
 5622    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5623    for (u64 i = 0; i < n; i++) {
 5624        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 5625    }
 5626}
 5627
 5628// --- fasttest.I32DeltaOpt.pmask.Sup
 5629// Return smallest number N such that indexes of all 1 bits are below N
 5630inline i32 fasttest::pmask_Sup(fasttest::I32DeltaOpt& parent) {
 5631    u64 lim = pmask_N(parent);
 5632    i32 ret = 0;
 5633    for (int i = lim-1; i >= 0; i--) {
 5634        u32 &val = pmask_qFind(parent, i);
 5635        if (val) {
 5636            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 5637            ret = i * 32 + bitidx;
 5638            break;
 5639        }
 5640    }
 5641    return ret;
 5642}
 5643
 5644// --- fasttest.I32DeltaOpt.Value67.PresentQ
 5645// Return true if the field is marked in the presence mask
 5646inline bool fasttest::Value67_PresentQ(fasttest::I32DeltaOpt& parent) {
 5647    return pmask_qGetBit(parent, 0);
 5648}
 5649
 5650// --- fasttest.I32DeltaOpt.Value67.SetPresent
 5651// Set presence bit for this field in the pmask
 5652inline void fasttest::Value67_SetPresent(fasttest::I32DeltaOpt& parent) {
 5653    pmask_qSetBit(parent, 0); // mark presence in pmask
 5654}
 5655
 5656// --- fasttest.I32DeltaOpt.Value67.Present_GetBit
 5657// Return field's bit number in the pmask
 5658inline int fasttest::Value67_Present_GetBit(fasttest::I32DeltaOpt& parent) {
 5659    int retval = 0;
 5660    (void)parent;//only to avoid -Wunused-parameter
 5661    return retval;
 5662}
 5663
 5664// --- fasttest.I32DeltaOpt.Value67.Set
 5665inline void fasttest::Value67_Set(fasttest::I32DeltaOpt& parent, i32 rhs) {
 5666    parent.Value67 = rhs;
 5667    pmask_qSetBit(parent, 0); // mark presence in pmask
 5668}
 5669
 5670// --- fasttest.I32DeltaOpt.pmask_bitcurs.Reset
 5671inline void fasttest::I32DeltaOpt_pmask_bitcurs_Reset(I32DeltaOpt_pmask_bitcurs &curs, fasttest::I32DeltaOpt &parent) {
 5672    curs.elems = &pmask_qFind(parent,0);
 5673    curs.n_elems = pmask_N(parent);
 5674    curs.bit = -1;
 5675    I32DeltaOpt_pmask_bitcurs_Next(curs);
 5676}
 5677
 5678// --- fasttest.I32DeltaOpt.pmask_bitcurs.ValidQ
 5679// cursor points to valid item
 5680inline bool fasttest::I32DeltaOpt_pmask_bitcurs_ValidQ(I32DeltaOpt_pmask_bitcurs &curs) {
 5681    return curs.bit < curs.n_elems*32;
 5682}
 5683
 5684// --- fasttest.I32DeltaOpt.pmask_bitcurs.Access
 5685// item access
 5686inline int& fasttest::I32DeltaOpt_pmask_bitcurs_Access(I32DeltaOpt_pmask_bitcurs &curs) {
 5687    return curs.bit;
 5688}
 5689
 5690// --- fasttest.I32DeltaOpt..GetMsgLength
 5691// Message length (uses length field)
 5692inline i32 fasttest::GetMsgLength(const fasttest::I32DeltaOpt& parent) {
 5693    return i32(const_cast<fasttest::I32DeltaOpt&>(parent).length);
 5694}
 5695
 5696// --- fasttest.I32DeltaOpt..GetMsgMemptr
 5697// Memptr encompassing the message (uses length field)
 5698inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32DeltaOpt& row) {
 5699    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32DeltaOpt&>(row).length));
 5700}
 5701
 5702// --- fasttest.I32DeltaOpt..Init
 5703// Set all fields to initial values.
 5704inline void fasttest::I32DeltaOpt_Init(fasttest::I32DeltaOpt& parent) {
 5705    parent.length = u32(ssizeof(parent) + (0));
 5706    parent.id = u32(67);
 5707    parent.pmask = u32(0);
 5708    parent.Value67 = i32(67);
 5709}
 5710inline fasttest::I32Dflt::I32Dflt() {
 5711    fasttest::I32Dflt_Init(*this);
 5712}
 5713
 5714
 5715// --- fasttest.I32Dflt.base.Castdown
 5716// Check if fasttest::TemplateHeader is an instance of I32Dflt by checking the type field
 5717// If it is, return the pointer of target type.
 5718// Additionally, check if the length field permits valid instance of I32Dflt.
 5719// If not successful, quietly return NULL.
 5720inline fasttest::I32Dflt* fasttest::I32Dflt_Castdown(fasttest::TemplateHeader &hdr) {
 5721    bool cond = hdr.id == (33);
 5722    cond &= i32(hdr.length) >= ssizeof(fasttest::I32Dflt);
 5723    return cond ? reinterpret_cast<fasttest::I32Dflt*>(&hdr) : NULL;
 5724}
 5725
 5726// --- fasttest.I32Dflt.base.Castbase
 5727inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32Dflt& parent) {
 5728    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 5729}
 5730
 5731// --- fasttest.I32Dflt..GetMsgLength
 5732// Message length (uses length field)
 5733inline i32 fasttest::GetMsgLength(const fasttest::I32Dflt& parent) {
 5734    return i32(const_cast<fasttest::I32Dflt&>(parent).length);
 5735}
 5736
 5737// --- fasttest.I32Dflt..GetMsgMemptr
 5738// Memptr encompassing the message (uses length field)
 5739inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32Dflt& row) {
 5740    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32Dflt&>(row).length));
 5741}
 5742
 5743// --- fasttest.I32Dflt..Init
 5744// Set all fields to initial values.
 5745inline void fasttest::I32Dflt_Init(fasttest::I32Dflt& parent) {
 5746    parent.length = u32(ssizeof(parent) + (0));
 5747    parent.id = u32(33);
 5748    parent.Value = i32(33);
 5749}
 5750inline fasttest::I32DfltNull::I32DfltNull() {
 5751    fasttest::I32DfltNull_Init(*this);
 5752}
 5753
 5754
 5755// --- fasttest.I32DfltNull.base.Castdown
 5756// Check if fasttest::TemplateHeader is an instance of I32DfltNull by checking the type field
 5757// If it is, return the pointer of target type.
 5758// Additionally, check if the length field permits valid instance of I32DfltNull.
 5759// If not successful, quietly return NULL.
 5760inline fasttest::I32DfltNull* fasttest::I32DfltNull_Castdown(fasttest::TemplateHeader &hdr) {
 5761    bool cond = hdr.id == (35);
 5762    cond &= i32(hdr.length) >= ssizeof(fasttest::I32DfltNull);
 5763    return cond ? reinterpret_cast<fasttest::I32DfltNull*>(&hdr) : NULL;
 5764}
 5765
 5766// --- fasttest.I32DfltNull.base.Castbase
 5767inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32DfltNull& parent) {
 5768    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 5769}
 5770
 5771// --- fasttest.I32DfltNull.pmask.N
 5772// Return constant 1
 5773inline int fasttest::pmask_N(fasttest::I32DfltNull& parent) {
 5774    (void)parent;
 5775    return 1;
 5776}
 5777
 5778// --- fasttest.I32DfltNull.pmask.qFind
 5779// Access value
 5780inline u32& fasttest::pmask_qFind(fasttest::I32DfltNull& parent, int) {
 5781    return parent.pmask;
 5782}
 5783
 5784// --- fasttest.I32DfltNull.pmask.NBits
 5785// Get max # of bits in the bitset
 5786// Return max. number of bits supported by array
 5787inline int fasttest::pmask_Nbits(fasttest::I32DfltNull& parent) {
 5788    return pmask_N(parent) * 32;
 5789}
 5790
 5791// --- fasttest.I32DfltNull.pmask.qGetBit
 5792// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 5793inline bool fasttest::pmask_qGetBit(fasttest::I32DfltNull& parent, u32 bit_idx) {
 5794    u64 elem_idx = bit_idx >> 5;
 5795    u64 shift = bit_idx & 31;
 5796    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 5797    return bool((elem >> shift) & 1); // extract bit
 5798}
 5799
 5800// --- fasttest.I32DfltNull.pmask.GetBit
 5801// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 5802inline bool fasttest::pmask_GetBit(fasttest::I32DfltNull& parent, u32 bit_idx) {
 5803    u64 elem_idx = bit_idx >> 5;
 5804    u64 shift = bit_idx & 31;
 5805    bool ret = false;
 5806    u64 lim = pmask_N(parent);
 5807    if (elem_idx < lim) {
 5808        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 5809        ret = (elem >> shift) & 1;                 // extract bit
 5810    }
 5811    return ret;
 5812}
 5813
 5814// --- fasttest.I32DfltNull.pmask.BitsEmptyQ
 5815// Check if all the bits in the bitset are equal to zero
 5816inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32DfltNull& parent) {
 5817    bool retval = true;
 5818    u64 n = pmask_N(parent);
 5819    for (u64 i = 0; i < n; i++) {
 5820        if (pmask_qFind(parent,i) != 0) {
 5821            retval = false;
 5822            break;
 5823        }
 5824    }
 5825    return retval;
 5826}
 5827
 5828// --- fasttest.I32DfltNull.pmask.Sum1s
 5829inline u64 fasttest::pmask_Sum1s(fasttest::I32DfltNull& parent) {
 5830    u64 sum = 0;
 5831    u64 n = pmask_N(parent);
 5832    for (u64 i = 0; i < n; i++) {
 5833        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 5834    }
 5835    return sum;
 5836}
 5837
 5838// --- fasttest.I32DfltNull.pmask.qClearBit
 5839// Clear bit # BIT_IDX in bit set. No bounds checking
 5840inline void fasttest::pmask_qClearBit(fasttest::I32DfltNull& parent, u32 bit_idx) {
 5841    u64 elem_idx = bit_idx >> 5;
 5842    u64 shift = bit_idx & 31;
 5843    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5844    elem = elem & ~(u32(1) << shift); // clear bit
 5845}
 5846
 5847// --- fasttest.I32DfltNull.pmask.ClearBit
 5848// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 5849inline void fasttest::pmask_ClearBit(fasttest::I32DfltNull& parent, u32 bit_idx) {
 5850    u64 elem_idx = bit_idx >> 5;
 5851    u64 shift = bit_idx & 31;
 5852    u64 lim = pmask_N(parent);
 5853    if (elem_idx < lim) {
 5854        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5855        elem = elem & ~(u32(1) << shift); // clear bit
 5856    }
 5857}
 5858
 5859// --- fasttest.I32DfltNull.pmask.qSetBit
 5860// Set bit # BIT_IDX in bit set. No bounds checking
 5861inline void fasttest::pmask_qSetBit(fasttest::I32DfltNull& parent, u32 bit_idx) {
 5862    u64 elem_idx = bit_idx >> 5;
 5863    u64 shift = bit_idx & 31;
 5864    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5865    elem = elem | (u32(1) << shift); // set bit
 5866}
 5867
 5868// --- fasttest.I32DfltNull.pmask.SetBit
 5869// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 5870inline void fasttest::pmask_SetBit(fasttest::I32DfltNull& parent, u32 bit_idx) {
 5871    u64 elem_idx = bit_idx >> 5;
 5872    u64 shift = bit_idx & 31;
 5873    u64 lim = pmask_N(parent);
 5874    if (elem_idx < lim) {
 5875        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5876        elem = elem | (u32(1) << shift); // set bit
 5877    }
 5878}
 5879
 5880// --- fasttest.I32DfltNull.pmask.qSetBitVal
 5881// Set bit # BIT_IDX in bit set. No bounds checking
 5882inline void fasttest::pmask_qSetBitVal(fasttest::I32DfltNull& parent, u32 bit_idx, bool val) {
 5883    u64 elem_idx = bit_idx >> 5;
 5884    u64 shift = bit_idx & 31;
 5885    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5886    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 5887}
 5888
 5889// --- fasttest.I32DfltNull.pmask.qOrBitVal
 5890// Or bit # BIT_IDX in bit set. No bounds checking
 5891inline void fasttest::pmask_qOrBitVal(fasttest::I32DfltNull& parent, u32 bit_idx, bool val) {
 5892    u64 elem_idx = bit_idx >> 5;
 5893    u64 shift = bit_idx & 31;
 5894    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 5895    elem = elem | (u32(val) << shift); // Or in val into elem
 5896}
 5897
 5898// --- fasttest.I32DfltNull.pmask.ClearBitsAll
 5899// Set all bits of array to zero.
 5900// Note: this does not change what NBits will return.
 5901inline void fasttest::pmask_ClearBitsAll(fasttest::I32DfltNull& parent) {
 5902    u64 n = pmask_N(parent);
 5903    for (u64 i = 0; i < n; i++) {
 5904        pmask_qFind(parent, i) = 0;
 5905    }
 5906}
 5907
 5908// --- fasttest.I32DfltNull.pmask.ClearBits
 5909// Zero in PARENT any bits that are set in RHS.
 5910inline void fasttest::pmask_ClearBits(fasttest::I32DfltNull& parent, fasttest::I32DfltNull &rhs) {
 5911    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5912    for (u64 i = 0; i < n; i++) {
 5913        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 5914    }
 5915}
 5916
 5917// --- fasttest.I32DfltNull.pmask.OrBits
 5918// Set PARENT to union of two bitsets.
 5919// (This function is not named Set.. to avoid triple entendre).
 5920inline void fasttest::pmask_OrBits(fasttest::I32DfltNull& parent, fasttest::I32DfltNull &rhs) {
 5921    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 5922    for (u64 i = 0; i < n; i++) {
 5923        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 5924    }
 5925}
 5926
 5927// --- fasttest.I32DfltNull.pmask.Sup
 5928// Return smallest number N such that indexes of all 1 bits are below N
 5929inline i32 fasttest::pmask_Sup(fasttest::I32DfltNull& parent) {
 5930    u64 lim = pmask_N(parent);
 5931    i32 ret = 0;
 5932    for (int i = lim-1; i >= 0; i--) {
 5933        u32 &val = pmask_qFind(parent, i);
 5934        if (val) {
 5935            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 5936            ret = i * 32 + bitidx;
 5937            break;
 5938        }
 5939    }
 5940    return ret;
 5941}
 5942
 5943// --- fasttest.I32DfltNull.Value.PresentQ
 5944// Return true if the field is marked in the presence mask
 5945inline bool fasttest::Value_PresentQ(fasttest::I32DfltNull& parent) {
 5946    return pmask_qGetBit(parent, 0);
 5947}
 5948
 5949// --- fasttest.I32DfltNull.Value.SetPresent
 5950// Set presence bit for this field in the pmask
 5951inline void fasttest::Value_SetPresent(fasttest::I32DfltNull& parent) {
 5952    pmask_qSetBit(parent, 0); // mark presence in pmask
 5953}
 5954
 5955// --- fasttest.I32DfltNull.Value.Present_GetBit
 5956// Return field's bit number in the pmask
 5957inline int fasttest::Value_Present_GetBit(fasttest::I32DfltNull& parent) {
 5958    int retval = 0;
 5959    (void)parent;//only to avoid -Wunused-parameter
 5960    return retval;
 5961}
 5962
 5963// --- fasttest.I32DfltNull.Value.Set
 5964inline void fasttest::Value_Set(fasttest::I32DfltNull& parent, i32 rhs) {
 5965    parent.Value = rhs;
 5966    pmask_qSetBit(parent, 0); // mark presence in pmask
 5967}
 5968
 5969// --- fasttest.I32DfltNull.pmask_bitcurs.Reset
 5970inline void fasttest::I32DfltNull_pmask_bitcurs_Reset(I32DfltNull_pmask_bitcurs &curs, fasttest::I32DfltNull &parent) {
 5971    curs.elems = &pmask_qFind(parent,0);
 5972    curs.n_elems = pmask_N(parent);
 5973    curs.bit = -1;
 5974    I32DfltNull_pmask_bitcurs_Next(curs);
 5975}
 5976
 5977// --- fasttest.I32DfltNull.pmask_bitcurs.ValidQ
 5978// cursor points to valid item
 5979inline bool fasttest::I32DfltNull_pmask_bitcurs_ValidQ(I32DfltNull_pmask_bitcurs &curs) {
 5980    return curs.bit < curs.n_elems*32;
 5981}
 5982
 5983// --- fasttest.I32DfltNull.pmask_bitcurs.Access
 5984// item access
 5985inline int& fasttest::I32DfltNull_pmask_bitcurs_Access(I32DfltNull_pmask_bitcurs &curs) {
 5986    return curs.bit;
 5987}
 5988
 5989// --- fasttest.I32DfltNull..GetMsgLength
 5990// Message length (uses length field)
 5991inline i32 fasttest::GetMsgLength(const fasttest::I32DfltNull& parent) {
 5992    return i32(const_cast<fasttest::I32DfltNull&>(parent).length);
 5993}
 5994
 5995// --- fasttest.I32DfltNull..GetMsgMemptr
 5996// Memptr encompassing the message (uses length field)
 5997inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32DfltNull& row) {
 5998    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32DfltNull&>(row).length));
 5999}
 6000
 6001// --- fasttest.I32DfltNull..Init
 6002// Set all fields to initial values.
 6003inline void fasttest::I32DfltNull_Init(fasttest::I32DfltNull& parent) {
 6004    parent.length = u32(ssizeof(parent) + (0));
 6005    parent.id = u32(35);
 6006    parent.pmask = u32(0);
 6007    parent.Value = i32(0);
 6008}
 6009inline fasttest::I32DfltOpt::I32DfltOpt() {
 6010    fasttest::I32DfltOpt_Init(*this);
 6011}
 6012
 6013
 6014// --- fasttest.I32DfltOpt.base.Castdown
 6015// Check if fasttest::TemplateHeader is an instance of I32DfltOpt by checking the type field
 6016// If it is, return the pointer of target type.
 6017// Additionally, check if the length field permits valid instance of I32DfltOpt.
 6018// If not successful, quietly return NULL.
 6019inline fasttest::I32DfltOpt* fasttest::I32DfltOpt_Castdown(fasttest::TemplateHeader &hdr) {
 6020    bool cond = hdr.id == (34);
 6021    cond &= i32(hdr.length) >= ssizeof(fasttest::I32DfltOpt);
 6022    return cond ? reinterpret_cast<fasttest::I32DfltOpt*>(&hdr) : NULL;
 6023}
 6024
 6025// --- fasttest.I32DfltOpt.base.Castbase
 6026inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32DfltOpt& parent) {
 6027    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 6028}
 6029
 6030// --- fasttest.I32DfltOpt.pmask.N
 6031// Return constant 1
 6032inline int fasttest::pmask_N(fasttest::I32DfltOpt& parent) {
 6033    (void)parent;
 6034    return 1;
 6035}
 6036
 6037// --- fasttest.I32DfltOpt.pmask.qFind
 6038// Access value
 6039inline u32& fasttest::pmask_qFind(fasttest::I32DfltOpt& parent, int) {
 6040    return parent.pmask;
 6041}
 6042
 6043// --- fasttest.I32DfltOpt.pmask.NBits
 6044// Get max # of bits in the bitset
 6045// Return max. number of bits supported by array
 6046inline int fasttest::pmask_Nbits(fasttest::I32DfltOpt& parent) {
 6047    return pmask_N(parent) * 32;
 6048}
 6049
 6050// --- fasttest.I32DfltOpt.pmask.qGetBit
 6051// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 6052inline bool fasttest::pmask_qGetBit(fasttest::I32DfltOpt& parent, u32 bit_idx) {
 6053    u64 elem_idx = bit_idx >> 5;
 6054    u64 shift = bit_idx & 31;
 6055    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6056    return bool((elem >> shift) & 1); // extract bit
 6057}
 6058
 6059// --- fasttest.I32DfltOpt.pmask.GetBit
 6060// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 6061inline bool fasttest::pmask_GetBit(fasttest::I32DfltOpt& parent, u32 bit_idx) {
 6062    u64 elem_idx = bit_idx >> 5;
 6063    u64 shift = bit_idx & 31;
 6064    bool ret = false;
 6065    u64 lim = pmask_N(parent);
 6066    if (elem_idx < lim) {
 6067        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6068        ret = (elem >> shift) & 1;                 // extract bit
 6069    }
 6070    return ret;
 6071}
 6072
 6073// --- fasttest.I32DfltOpt.pmask.BitsEmptyQ
 6074// Check if all the bits in the bitset are equal to zero
 6075inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32DfltOpt& parent) {
 6076    bool retval = true;
 6077    u64 n = pmask_N(parent);
 6078    for (u64 i = 0; i < n; i++) {
 6079        if (pmask_qFind(parent,i) != 0) {
 6080            retval = false;
 6081            break;
 6082        }
 6083    }
 6084    return retval;
 6085}
 6086
 6087// --- fasttest.I32DfltOpt.pmask.Sum1s
 6088inline u64 fasttest::pmask_Sum1s(fasttest::I32DfltOpt& parent) {
 6089    u64 sum = 0;
 6090    u64 n = pmask_N(parent);
 6091    for (u64 i = 0; i < n; i++) {
 6092        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 6093    }
 6094    return sum;
 6095}
 6096
 6097// --- fasttest.I32DfltOpt.pmask.qClearBit
 6098// Clear bit # BIT_IDX in bit set. No bounds checking
 6099inline void fasttest::pmask_qClearBit(fasttest::I32DfltOpt& parent, u32 bit_idx) {
 6100    u64 elem_idx = bit_idx >> 5;
 6101    u64 shift = bit_idx & 31;
 6102    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6103    elem = elem & ~(u32(1) << shift); // clear bit
 6104}
 6105
 6106// --- fasttest.I32DfltOpt.pmask.ClearBit
 6107// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 6108inline void fasttest::pmask_ClearBit(fasttest::I32DfltOpt& parent, u32 bit_idx) {
 6109    u64 elem_idx = bit_idx >> 5;
 6110    u64 shift = bit_idx & 31;
 6111    u64 lim = pmask_N(parent);
 6112    if (elem_idx < lim) {
 6113        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6114        elem = elem & ~(u32(1) << shift); // clear bit
 6115    }
 6116}
 6117
 6118// --- fasttest.I32DfltOpt.pmask.qSetBit
 6119// Set bit # BIT_IDX in bit set. No bounds checking
 6120inline void fasttest::pmask_qSetBit(fasttest::I32DfltOpt& parent, u32 bit_idx) {
 6121    u64 elem_idx = bit_idx >> 5;
 6122    u64 shift = bit_idx & 31;
 6123    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6124    elem = elem | (u32(1) << shift); // set bit
 6125}
 6126
 6127// --- fasttest.I32DfltOpt.pmask.SetBit
 6128// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 6129inline void fasttest::pmask_SetBit(fasttest::I32DfltOpt& parent, u32 bit_idx) {
 6130    u64 elem_idx = bit_idx >> 5;
 6131    u64 shift = bit_idx & 31;
 6132    u64 lim = pmask_N(parent);
 6133    if (elem_idx < lim) {
 6134        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6135        elem = elem | (u32(1) << shift); // set bit
 6136    }
 6137}
 6138
 6139// --- fasttest.I32DfltOpt.pmask.qSetBitVal
 6140// Set bit # BIT_IDX in bit set. No bounds checking
 6141inline void fasttest::pmask_qSetBitVal(fasttest::I32DfltOpt& parent, u32 bit_idx, bool val) {
 6142    u64 elem_idx = bit_idx >> 5;
 6143    u64 shift = bit_idx & 31;
 6144    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6145    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 6146}
 6147
 6148// --- fasttest.I32DfltOpt.pmask.qOrBitVal
 6149// Or bit # BIT_IDX in bit set. No bounds checking
 6150inline void fasttest::pmask_qOrBitVal(fasttest::I32DfltOpt& parent, u32 bit_idx, bool val) {
 6151    u64 elem_idx = bit_idx >> 5;
 6152    u64 shift = bit_idx & 31;
 6153    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6154    elem = elem | (u32(val) << shift); // Or in val into elem
 6155}
 6156
 6157// --- fasttest.I32DfltOpt.pmask.ClearBitsAll
 6158// Set all bits of array to zero.
 6159// Note: this does not change what NBits will return.
 6160inline void fasttest::pmask_ClearBitsAll(fasttest::I32DfltOpt& parent) {
 6161    u64 n = pmask_N(parent);
 6162    for (u64 i = 0; i < n; i++) {
 6163        pmask_qFind(parent, i) = 0;
 6164    }
 6165}
 6166
 6167// --- fasttest.I32DfltOpt.pmask.ClearBits
 6168// Zero in PARENT any bits that are set in RHS.
 6169inline void fasttest::pmask_ClearBits(fasttest::I32DfltOpt& parent, fasttest::I32DfltOpt &rhs) {
 6170    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 6171    for (u64 i = 0; i < n; i++) {
 6172        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 6173    }
 6174}
 6175
 6176// --- fasttest.I32DfltOpt.pmask.OrBits
 6177// Set PARENT to union of two bitsets.
 6178// (This function is not named Set.. to avoid triple entendre).
 6179inline void fasttest::pmask_OrBits(fasttest::I32DfltOpt& parent, fasttest::I32DfltOpt &rhs) {
 6180    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 6181    for (u64 i = 0; i < n; i++) {
 6182        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 6183    }
 6184}
 6185
 6186// --- fasttest.I32DfltOpt.pmask.Sup
 6187// Return smallest number N such that indexes of all 1 bits are below N
 6188inline i32 fasttest::pmask_Sup(fasttest::I32DfltOpt& parent) {
 6189    u64 lim = pmask_N(parent);
 6190    i32 ret = 0;
 6191    for (int i = lim-1; i >= 0; i--) {
 6192        u32 &val = pmask_qFind(parent, i);
 6193        if (val) {
 6194            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 6195            ret = i * 32 + bitidx;
 6196            break;
 6197        }
 6198    }
 6199    return ret;
 6200}
 6201
 6202// --- fasttest.I32DfltOpt.Value.PresentQ
 6203// Return true if the field is marked in the presence mask
 6204inline bool fasttest::Value_PresentQ(fasttest::I32DfltOpt& parent) {
 6205    return pmask_qGetBit(parent, 0);
 6206}
 6207
 6208// --- fasttest.I32DfltOpt.Value.SetPresent
 6209// Set presence bit for this field in the pmask
 6210inline void fasttest::Value_SetPresent(fasttest::I32DfltOpt& parent) {
 6211    pmask_qSetBit(parent, 0); // mark presence in pmask
 6212}
 6213
 6214// --- fasttest.I32DfltOpt.Value.Present_GetBit
 6215// Return field's bit number in the pmask
 6216inline int fasttest::Value_Present_GetBit(fasttest::I32DfltOpt& parent) {
 6217    int retval = 0;
 6218    (void)parent;//only to avoid -Wunused-parameter
 6219    return retval;
 6220}
 6221
 6222// --- fasttest.I32DfltOpt.Value.Set
 6223inline void fasttest::Value_Set(fasttest::I32DfltOpt& parent, i32 rhs) {
 6224    parent.Value = rhs;
 6225    pmask_qSetBit(parent, 0); // mark presence in pmask
 6226}
 6227
 6228// --- fasttest.I32DfltOpt.pmask_bitcurs.Reset
 6229inline void fasttest::I32DfltOpt_pmask_bitcurs_Reset(I32DfltOpt_pmask_bitcurs &curs, fasttest::I32DfltOpt &parent) {
 6230    curs.elems = &pmask_qFind(parent,0);
 6231    curs.n_elems = pmask_N(parent);
 6232    curs.bit = -1;
 6233    I32DfltOpt_pmask_bitcurs_Next(curs);
 6234}
 6235
 6236// --- fasttest.I32DfltOpt.pmask_bitcurs.ValidQ
 6237// cursor points to valid item
 6238inline bool fasttest::I32DfltOpt_pmask_bitcurs_ValidQ(I32DfltOpt_pmask_bitcurs &curs) {
 6239    return curs.bit < curs.n_elems*32;
 6240}
 6241
 6242// --- fasttest.I32DfltOpt.pmask_bitcurs.Access
 6243// item access
 6244inline int& fasttest::I32DfltOpt_pmask_bitcurs_Access(I32DfltOpt_pmask_bitcurs &curs) {
 6245    return curs.bit;
 6246}
 6247
 6248// --- fasttest.I32DfltOpt..GetMsgLength
 6249// Message length (uses length field)
 6250inline i32 fasttest::GetMsgLength(const fasttest::I32DfltOpt& parent) {
 6251    return i32(const_cast<fasttest::I32DfltOpt&>(parent).length);
 6252}
 6253
 6254// --- fasttest.I32DfltOpt..GetMsgMemptr
 6255// Memptr encompassing the message (uses length field)
 6256inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32DfltOpt& row) {
 6257    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32DfltOpt&>(row).length));
 6258}
 6259
 6260// --- fasttest.I32DfltOpt..Init
 6261// Set all fields to initial values.
 6262inline void fasttest::I32DfltOpt_Init(fasttest::I32DfltOpt& parent) {
 6263    parent.length = u32(ssizeof(parent) + (0));
 6264    parent.id = u32(34);
 6265    parent.pmask = u32(0);
 6266    parent.Value = i32(34);
 6267}
 6268inline fasttest::I32Incr::I32Incr() {
 6269    fasttest::I32Incr_Init(*this);
 6270}
 6271
 6272
 6273// --- fasttest.I32Incr.base.Castdown
 6274// Check if fasttest::TemplateHeader is an instance of I32Incr by checking the type field
 6275// If it is, return the pointer of target type.
 6276// Additionally, check if the length field permits valid instance of I32Incr.
 6277// If not successful, quietly return NULL.
 6278inline fasttest::I32Incr* fasttest::I32Incr_Castdown(fasttest::TemplateHeader &hdr) {
 6279    bool cond = hdr.id == (97);
 6280    cond &= i32(hdr.length) >= ssizeof(fasttest::I32Incr);
 6281    return cond ? reinterpret_cast<fasttest::I32Incr*>(&hdr) : NULL;
 6282}
 6283
 6284// --- fasttest.I32Incr.base.Castbase
 6285inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32Incr& parent) {
 6286    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 6287}
 6288
 6289// --- fasttest.I32Incr..GetMsgLength
 6290// Message length (uses length field)
 6291inline i32 fasttest::GetMsgLength(const fasttest::I32Incr& parent) {
 6292    return i32(const_cast<fasttest::I32Incr&>(parent).length);
 6293}
 6294
 6295// --- fasttest.I32Incr..GetMsgMemptr
 6296// Memptr encompassing the message (uses length field)
 6297inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32Incr& row) {
 6298    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32Incr&>(row).length));
 6299}
 6300
 6301// --- fasttest.I32Incr..Init
 6302// Set all fields to initial values.
 6303inline void fasttest::I32Incr_Init(fasttest::I32Incr& parent) {
 6304    parent.length = u32(ssizeof(parent) + (0));
 6305    parent.id = u32(97);
 6306    parent.Value97 = i32(97);
 6307}
 6308inline fasttest::I32IncrNV::I32IncrNV() {
 6309    fasttest::I32IncrNV_Init(*this);
 6310}
 6311
 6312
 6313// --- fasttest.I32IncrNV.base.Castdown
 6314// Check if fasttest::TemplateHeader is an instance of I32IncrNV by checking the type field
 6315// If it is, return the pointer of target type.
 6316// Additionally, check if the length field permits valid instance of I32IncrNV.
 6317// If not successful, quietly return NULL.
 6318inline fasttest::I32IncrNV* fasttest::I32IncrNV_Castdown(fasttest::TemplateHeader &hdr) {
 6319    bool cond = hdr.id == (98);
 6320    cond &= i32(hdr.length) >= ssizeof(fasttest::I32IncrNV);
 6321    return cond ? reinterpret_cast<fasttest::I32IncrNV*>(&hdr) : NULL;
 6322}
 6323
 6324// --- fasttest.I32IncrNV.base.Castbase
 6325inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32IncrNV& parent) {
 6326    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 6327}
 6328
 6329// --- fasttest.I32IncrNV..GetMsgLength
 6330// Message length (uses length field)
 6331inline i32 fasttest::GetMsgLength(const fasttest::I32IncrNV& parent) {
 6332    return i32(const_cast<fasttest::I32IncrNV&>(parent).length);
 6333}
 6334
 6335// --- fasttest.I32IncrNV..GetMsgMemptr
 6336// Memptr encompassing the message (uses length field)
 6337inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32IncrNV& row) {
 6338    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32IncrNV&>(row).length));
 6339}
 6340
 6341// --- fasttest.I32IncrNV..Init
 6342// Set all fields to initial values.
 6343inline void fasttest::I32IncrNV_Init(fasttest::I32IncrNV& parent) {
 6344    parent.length = u32(ssizeof(parent) + (0));
 6345    parent.id = u32(98);
 6346    parent.Value98 = i32(0);
 6347}
 6348inline fasttest::I32IncrNull::I32IncrNull() {
 6349    fasttest::I32IncrNull_Init(*this);
 6350}
 6351
 6352
 6353// --- fasttest.I32IncrNull.base.Castdown
 6354// Check if fasttest::TemplateHeader is an instance of I32IncrNull by checking the type field
 6355// If it is, return the pointer of target type.
 6356// Additionally, check if the length field permits valid instance of I32IncrNull.
 6357// If not successful, quietly return NULL.
 6358inline fasttest::I32IncrNull* fasttest::I32IncrNull_Castdown(fasttest::TemplateHeader &hdr) {
 6359    bool cond = hdr.id == (100);
 6360    cond &= i32(hdr.length) >= ssizeof(fasttest::I32IncrNull);
 6361    return cond ? reinterpret_cast<fasttest::I32IncrNull*>(&hdr) : NULL;
 6362}
 6363
 6364// --- fasttest.I32IncrNull.base.Castbase
 6365inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32IncrNull& parent) {
 6366    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 6367}
 6368
 6369// --- fasttest.I32IncrNull.pmask.N
 6370// Return constant 1
 6371inline int fasttest::pmask_N(fasttest::I32IncrNull& parent) {
 6372    (void)parent;
 6373    return 1;
 6374}
 6375
 6376// --- fasttest.I32IncrNull.pmask.qFind
 6377// Access value
 6378inline u32& fasttest::pmask_qFind(fasttest::I32IncrNull& parent, int) {
 6379    return parent.pmask;
 6380}
 6381
 6382// --- fasttest.I32IncrNull.pmask.NBits
 6383// Get max # of bits in the bitset
 6384// Return max. number of bits supported by array
 6385inline int fasttest::pmask_Nbits(fasttest::I32IncrNull& parent) {
 6386    return pmask_N(parent) * 32;
 6387}
 6388
 6389// --- fasttest.I32IncrNull.pmask.qGetBit
 6390// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 6391inline bool fasttest::pmask_qGetBit(fasttest::I32IncrNull& parent, u32 bit_idx) {
 6392    u64 elem_idx = bit_idx >> 5;
 6393    u64 shift = bit_idx & 31;
 6394    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6395    return bool((elem >> shift) & 1); // extract bit
 6396}
 6397
 6398// --- fasttest.I32IncrNull.pmask.GetBit
 6399// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 6400inline bool fasttest::pmask_GetBit(fasttest::I32IncrNull& parent, u32 bit_idx) {
 6401    u64 elem_idx = bit_idx >> 5;
 6402    u64 shift = bit_idx & 31;
 6403    bool ret = false;
 6404    u64 lim = pmask_N(parent);
 6405    if (elem_idx < lim) {
 6406        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6407        ret = (elem >> shift) & 1;                 // extract bit
 6408    }
 6409    return ret;
 6410}
 6411
 6412// --- fasttest.I32IncrNull.pmask.BitsEmptyQ
 6413// Check if all the bits in the bitset are equal to zero
 6414inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32IncrNull& parent) {
 6415    bool retval = true;
 6416    u64 n = pmask_N(parent);
 6417    for (u64 i = 0; i < n; i++) {
 6418        if (pmask_qFind(parent,i) != 0) {
 6419            retval = false;
 6420            break;
 6421        }
 6422    }
 6423    return retval;
 6424}
 6425
 6426// --- fasttest.I32IncrNull.pmask.Sum1s
 6427inline u64 fasttest::pmask_Sum1s(fasttest::I32IncrNull& parent) {
 6428    u64 sum = 0;
 6429    u64 n = pmask_N(parent);
 6430    for (u64 i = 0; i < n; i++) {
 6431        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 6432    }
 6433    return sum;
 6434}
 6435
 6436// --- fasttest.I32IncrNull.pmask.qClearBit
 6437// Clear bit # BIT_IDX in bit set. No bounds checking
 6438inline void fasttest::pmask_qClearBit(fasttest::I32IncrNull& parent, u32 bit_idx) {
 6439    u64 elem_idx = bit_idx >> 5;
 6440    u64 shift = bit_idx & 31;
 6441    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6442    elem = elem & ~(u32(1) << shift); // clear bit
 6443}
 6444
 6445// --- fasttest.I32IncrNull.pmask.ClearBit
 6446// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 6447inline void fasttest::pmask_ClearBit(fasttest::I32IncrNull& parent, u32 bit_idx) {
 6448    u64 elem_idx = bit_idx >> 5;
 6449    u64 shift = bit_idx & 31;
 6450    u64 lim = pmask_N(parent);
 6451    if (elem_idx < lim) {
 6452        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6453        elem = elem & ~(u32(1) << shift); // clear bit
 6454    }
 6455}
 6456
 6457// --- fasttest.I32IncrNull.pmask.qSetBit
 6458// Set bit # BIT_IDX in bit set. No bounds checking
 6459inline void fasttest::pmask_qSetBit(fasttest::I32IncrNull& parent, u32 bit_idx) {
 6460    u64 elem_idx = bit_idx >> 5;
 6461    u64 shift = bit_idx & 31;
 6462    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6463    elem = elem | (u32(1) << shift); // set bit
 6464}
 6465
 6466// --- fasttest.I32IncrNull.pmask.SetBit
 6467// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 6468inline void fasttest::pmask_SetBit(fasttest::I32IncrNull& parent, u32 bit_idx) {
 6469    u64 elem_idx = bit_idx >> 5;
 6470    u64 shift = bit_idx & 31;
 6471    u64 lim = pmask_N(parent);
 6472    if (elem_idx < lim) {
 6473        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6474        elem = elem | (u32(1) << shift); // set bit
 6475    }
 6476}
 6477
 6478// --- fasttest.I32IncrNull.pmask.qSetBitVal
 6479// Set bit # BIT_IDX in bit set. No bounds checking
 6480inline void fasttest::pmask_qSetBitVal(fasttest::I32IncrNull& parent, u32 bit_idx, bool val) {
 6481    u64 elem_idx = bit_idx >> 5;
 6482    u64 shift = bit_idx & 31;
 6483    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6484    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 6485}
 6486
 6487// --- fasttest.I32IncrNull.pmask.qOrBitVal
 6488// Or bit # BIT_IDX in bit set. No bounds checking
 6489inline void fasttest::pmask_qOrBitVal(fasttest::I32IncrNull& parent, u32 bit_idx, bool val) {
 6490    u64 elem_idx = bit_idx >> 5;
 6491    u64 shift = bit_idx & 31;
 6492    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6493    elem = elem | (u32(val) << shift); // Or in val into elem
 6494}
 6495
 6496// --- fasttest.I32IncrNull.pmask.ClearBitsAll
 6497// Set all bits of array to zero.
 6498// Note: this does not change what NBits will return.
 6499inline void fasttest::pmask_ClearBitsAll(fasttest::I32IncrNull& parent) {
 6500    u64 n = pmask_N(parent);
 6501    for (u64 i = 0; i < n; i++) {
 6502        pmask_qFind(parent, i) = 0;
 6503    }
 6504}
 6505
 6506// --- fasttest.I32IncrNull.pmask.ClearBits
 6507// Zero in PARENT any bits that are set in RHS.
 6508inline void fasttest::pmask_ClearBits(fasttest::I32IncrNull& parent, fasttest::I32IncrNull &rhs) {
 6509    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 6510    for (u64 i = 0; i < n; i++) {
 6511        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 6512    }
 6513}
 6514
 6515// --- fasttest.I32IncrNull.pmask.OrBits
 6516// Set PARENT to union of two bitsets.
 6517// (This function is not named Set.. to avoid triple entendre).
 6518inline void fasttest::pmask_OrBits(fasttest::I32IncrNull& parent, fasttest::I32IncrNull &rhs) {
 6519    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 6520    for (u64 i = 0; i < n; i++) {
 6521        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 6522    }
 6523}
 6524
 6525// --- fasttest.I32IncrNull.pmask.Sup
 6526// Return smallest number N such that indexes of all 1 bits are below N
 6527inline i32 fasttest::pmask_Sup(fasttest::I32IncrNull& parent) {
 6528    u64 lim = pmask_N(parent);
 6529    i32 ret = 0;
 6530    for (int i = lim-1; i >= 0; i--) {
 6531        u32 &val = pmask_qFind(parent, i);
 6532        if (val) {
 6533            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 6534            ret = i * 32 + bitidx;
 6535            break;
 6536        }
 6537    }
 6538    return ret;
 6539}
 6540
 6541// --- fasttest.I32IncrNull.Value100.PresentQ
 6542// Return true if the field is marked in the presence mask
 6543inline bool fasttest::Value100_PresentQ(fasttest::I32IncrNull& parent) {
 6544    return pmask_qGetBit(parent, 0);
 6545}
 6546
 6547// --- fasttest.I32IncrNull.Value100.SetPresent
 6548// Set presence bit for this field in the pmask
 6549inline void fasttest::Value100_SetPresent(fasttest::I32IncrNull& parent) {
 6550    pmask_qSetBit(parent, 0); // mark presence in pmask
 6551}
 6552
 6553// --- fasttest.I32IncrNull.Value100.Present_GetBit
 6554// Return field's bit number in the pmask
 6555inline int fasttest::Value100_Present_GetBit(fasttest::I32IncrNull& parent) {
 6556    int retval = 0;
 6557    (void)parent;//only to avoid -Wunused-parameter
 6558    return retval;
 6559}
 6560
 6561// --- fasttest.I32IncrNull.Value100.Set
 6562inline void fasttest::Value100_Set(fasttest::I32IncrNull& parent, i32 rhs) {
 6563    parent.Value100 = rhs;
 6564    pmask_qSetBit(parent, 0); // mark presence in pmask
 6565}
 6566
 6567// --- fasttest.I32IncrNull.pmask_bitcurs.Reset
 6568inline void fasttest::I32IncrNull_pmask_bitcurs_Reset(I32IncrNull_pmask_bitcurs &curs, fasttest::I32IncrNull &parent) {
 6569    curs.elems = &pmask_qFind(parent,0);
 6570    curs.n_elems = pmask_N(parent);
 6571    curs.bit = -1;
 6572    I32IncrNull_pmask_bitcurs_Next(curs);
 6573}
 6574
 6575// --- fasttest.I32IncrNull.pmask_bitcurs.ValidQ
 6576// cursor points to valid item
 6577inline bool fasttest::I32IncrNull_pmask_bitcurs_ValidQ(I32IncrNull_pmask_bitcurs &curs) {
 6578    return curs.bit < curs.n_elems*32;
 6579}
 6580
 6581// --- fasttest.I32IncrNull.pmask_bitcurs.Access
 6582// item access
 6583inline int& fasttest::I32IncrNull_pmask_bitcurs_Access(I32IncrNull_pmask_bitcurs &curs) {
 6584    return curs.bit;
 6585}
 6586
 6587// --- fasttest.I32IncrNull..GetMsgLength
 6588// Message length (uses length field)
 6589inline i32 fasttest::GetMsgLength(const fasttest::I32IncrNull& parent) {
 6590    return i32(const_cast<fasttest::I32IncrNull&>(parent).length);
 6591}
 6592
 6593// --- fasttest.I32IncrNull..GetMsgMemptr
 6594// Memptr encompassing the message (uses length field)
 6595inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32IncrNull& row) {
 6596    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32IncrNull&>(row).length));
 6597}
 6598
 6599// --- fasttest.I32IncrNull..Init
 6600// Set all fields to initial values.
 6601inline void fasttest::I32IncrNull_Init(fasttest::I32IncrNull& parent) {
 6602    parent.length = u32(ssizeof(parent) + (0));
 6603    parent.id = u32(100);
 6604    parent.pmask = u32(0);
 6605    parent.Value100 = i32(0);
 6606}
 6607inline fasttest::I32IncrOpt::I32IncrOpt() {
 6608    fasttest::I32IncrOpt_Init(*this);
 6609}
 6610
 6611
 6612// --- fasttest.I32IncrOpt.base.Castdown
 6613// Check if fasttest::TemplateHeader is an instance of I32IncrOpt by checking the type field
 6614// If it is, return the pointer of target type.
 6615// Additionally, check if the length field permits valid instance of I32IncrOpt.
 6616// If not successful, quietly return NULL.
 6617inline fasttest::I32IncrOpt* fasttest::I32IncrOpt_Castdown(fasttest::TemplateHeader &hdr) {
 6618    bool cond = hdr.id == (99);
 6619    cond &= i32(hdr.length) >= ssizeof(fasttest::I32IncrOpt);
 6620    return cond ? reinterpret_cast<fasttest::I32IncrOpt*>(&hdr) : NULL;
 6621}
 6622
 6623// --- fasttest.I32IncrOpt.base.Castbase
 6624inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32IncrOpt& parent) {
 6625    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 6626}
 6627
 6628// --- fasttest.I32IncrOpt.pmask.N
 6629// Return constant 1
 6630inline int fasttest::pmask_N(fasttest::I32IncrOpt& parent) {
 6631    (void)parent;
 6632    return 1;
 6633}
 6634
 6635// --- fasttest.I32IncrOpt.pmask.qFind
 6636// Access value
 6637inline u32& fasttest::pmask_qFind(fasttest::I32IncrOpt& parent, int) {
 6638    return parent.pmask;
 6639}
 6640
 6641// --- fasttest.I32IncrOpt.pmask.NBits
 6642// Get max # of bits in the bitset
 6643// Return max. number of bits supported by array
 6644inline int fasttest::pmask_Nbits(fasttest::I32IncrOpt& parent) {
 6645    return pmask_N(parent) * 32;
 6646}
 6647
 6648// --- fasttest.I32IncrOpt.pmask.qGetBit
 6649// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 6650inline bool fasttest::pmask_qGetBit(fasttest::I32IncrOpt& parent, u32 bit_idx) {
 6651    u64 elem_idx = bit_idx >> 5;
 6652    u64 shift = bit_idx & 31;
 6653    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6654    return bool((elem >> shift) & 1); // extract bit
 6655}
 6656
 6657// --- fasttest.I32IncrOpt.pmask.GetBit
 6658// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 6659inline bool fasttest::pmask_GetBit(fasttest::I32IncrOpt& parent, u32 bit_idx) {
 6660    u64 elem_idx = bit_idx >> 5;
 6661    u64 shift = bit_idx & 31;
 6662    bool ret = false;
 6663    u64 lim = pmask_N(parent);
 6664    if (elem_idx < lim) {
 6665        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6666        ret = (elem >> shift) & 1;                 // extract bit
 6667    }
 6668    return ret;
 6669}
 6670
 6671// --- fasttest.I32IncrOpt.pmask.BitsEmptyQ
 6672// Check if all the bits in the bitset are equal to zero
 6673inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32IncrOpt& parent) {
 6674    bool retval = true;
 6675    u64 n = pmask_N(parent);
 6676    for (u64 i = 0; i < n; i++) {
 6677        if (pmask_qFind(parent,i) != 0) {
 6678            retval = false;
 6679            break;
 6680        }
 6681    }
 6682    return retval;
 6683}
 6684
 6685// --- fasttest.I32IncrOpt.pmask.Sum1s
 6686inline u64 fasttest::pmask_Sum1s(fasttest::I32IncrOpt& parent) {
 6687    u64 sum = 0;
 6688    u64 n = pmask_N(parent);
 6689    for (u64 i = 0; i < n; i++) {
 6690        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 6691    }
 6692    return sum;
 6693}
 6694
 6695// --- fasttest.I32IncrOpt.pmask.qClearBit
 6696// Clear bit # BIT_IDX in bit set. No bounds checking
 6697inline void fasttest::pmask_qClearBit(fasttest::I32IncrOpt& parent, u32 bit_idx) {
 6698    u64 elem_idx = bit_idx >> 5;
 6699    u64 shift = bit_idx & 31;
 6700    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6701    elem = elem & ~(u32(1) << shift); // clear bit
 6702}
 6703
 6704// --- fasttest.I32IncrOpt.pmask.ClearBit
 6705// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 6706inline void fasttest::pmask_ClearBit(fasttest::I32IncrOpt& parent, u32 bit_idx) {
 6707    u64 elem_idx = bit_idx >> 5;
 6708    u64 shift = bit_idx & 31;
 6709    u64 lim = pmask_N(parent);
 6710    if (elem_idx < lim) {
 6711        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6712        elem = elem & ~(u32(1) << shift); // clear bit
 6713    }
 6714}
 6715
 6716// --- fasttest.I32IncrOpt.pmask.qSetBit
 6717// Set bit # BIT_IDX in bit set. No bounds checking
 6718inline void fasttest::pmask_qSetBit(fasttest::I32IncrOpt& parent, u32 bit_idx) {
 6719    u64 elem_idx = bit_idx >> 5;
 6720    u64 shift = bit_idx & 31;
 6721    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6722    elem = elem | (u32(1) << shift); // set bit
 6723}
 6724
 6725// --- fasttest.I32IncrOpt.pmask.SetBit
 6726// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 6727inline void fasttest::pmask_SetBit(fasttest::I32IncrOpt& parent, u32 bit_idx) {
 6728    u64 elem_idx = bit_idx >> 5;
 6729    u64 shift = bit_idx & 31;
 6730    u64 lim = pmask_N(parent);
 6731    if (elem_idx < lim) {
 6732        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6733        elem = elem | (u32(1) << shift); // set bit
 6734    }
 6735}
 6736
 6737// --- fasttest.I32IncrOpt.pmask.qSetBitVal
 6738// Set bit # BIT_IDX in bit set. No bounds checking
 6739inline void fasttest::pmask_qSetBitVal(fasttest::I32IncrOpt& parent, u32 bit_idx, bool val) {
 6740    u64 elem_idx = bit_idx >> 5;
 6741    u64 shift = bit_idx & 31;
 6742    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6743    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 6744}
 6745
 6746// --- fasttest.I32IncrOpt.pmask.qOrBitVal
 6747// Or bit # BIT_IDX in bit set. No bounds checking
 6748inline void fasttest::pmask_qOrBitVal(fasttest::I32IncrOpt& parent, u32 bit_idx, bool val) {
 6749    u64 elem_idx = bit_idx >> 5;
 6750    u64 shift = bit_idx & 31;
 6751    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 6752    elem = elem | (u32(val) << shift); // Or in val into elem
 6753}
 6754
 6755// --- fasttest.I32IncrOpt.pmask.ClearBitsAll
 6756// Set all bits of array to zero.
 6757// Note: this does not change what NBits will return.
 6758inline void fasttest::pmask_ClearBitsAll(fasttest::I32IncrOpt& parent) {
 6759    u64 n = pmask_N(parent);
 6760    for (u64 i = 0; i < n; i++) {
 6761        pmask_qFind(parent, i) = 0;
 6762    }
 6763}
 6764
 6765// --- fasttest.I32IncrOpt.pmask.ClearBits
 6766// Zero in PARENT any bits that are set in RHS.
 6767inline void fasttest::pmask_ClearBits(fasttest::I32IncrOpt& parent, fasttest::I32IncrOpt &rhs) {
 6768    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 6769    for (u64 i = 0; i < n; i++) {
 6770        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 6771    }
 6772}
 6773
 6774// --- fasttest.I32IncrOpt.pmask.OrBits
 6775// Set PARENT to union of two bitsets.
 6776// (This function is not named Set.. to avoid triple entendre).
 6777inline void fasttest::pmask_OrBits(fasttest::I32IncrOpt& parent, fasttest::I32IncrOpt &rhs) {
 6778    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 6779    for (u64 i = 0; i < n; i++) {
 6780        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 6781    }
 6782}
 6783
 6784// --- fasttest.I32IncrOpt.pmask.Sup
 6785// Return smallest number N such that indexes of all 1 bits are below N
 6786inline i32 fasttest::pmask_Sup(fasttest::I32IncrOpt& parent) {
 6787    u64 lim = pmask_N(parent);
 6788    i32 ret = 0;
 6789    for (int i = lim-1; i >= 0; i--) {
 6790        u32 &val = pmask_qFind(parent, i);
 6791        if (val) {
 6792            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 6793            ret = i * 32 + bitidx;
 6794            break;
 6795        }
 6796    }
 6797    return ret;
 6798}
 6799
 6800// --- fasttest.I32IncrOpt.Value99.PresentQ
 6801// Return true if the field is marked in the presence mask
 6802inline bool fasttest::Value99_PresentQ(fasttest::I32IncrOpt& parent) {
 6803    return pmask_qGetBit(parent, 0);
 6804}
 6805
 6806// --- fasttest.I32IncrOpt.Value99.SetPresent
 6807// Set presence bit for this field in the pmask
 6808inline void fasttest::Value99_SetPresent(fasttest::I32IncrOpt& parent) {
 6809    pmask_qSetBit(parent, 0); // mark presence in pmask
 6810}
 6811
 6812// --- fasttest.I32IncrOpt.Value99.Present_GetBit
 6813// Return field's bit number in the pmask
 6814inline int fasttest::Value99_Present_GetBit(fasttest::I32IncrOpt& parent) {
 6815    int retval = 0;
 6816    (void)parent;//only to avoid -Wunused-parameter
 6817    return retval;
 6818}
 6819
 6820// --- fasttest.I32IncrOpt.Value99.Set
 6821inline void fasttest::Value99_Set(fasttest::I32IncrOpt& parent, i32 rhs) {
 6822    parent.Value99 = rhs;
 6823    pmask_qSetBit(parent, 0); // mark presence in pmask
 6824}
 6825
 6826// --- fasttest.I32IncrOpt.pmask_bitcurs.Reset
 6827inline void fasttest::I32IncrOpt_pmask_bitcurs_Reset(I32IncrOpt_pmask_bitcurs &curs, fasttest::I32IncrOpt &parent) {
 6828    curs.elems = &pmask_qFind(parent,0);
 6829    curs.n_elems = pmask_N(parent);
 6830    curs.bit = -1;
 6831    I32IncrOpt_pmask_bitcurs_Next(curs);
 6832}
 6833
 6834// --- fasttest.I32IncrOpt.pmask_bitcurs.ValidQ
 6835// cursor points to valid item
 6836inline bool fasttest::I32IncrOpt_pmask_bitcurs_ValidQ(I32IncrOpt_pmask_bitcurs &curs) {
 6837    return curs.bit < curs.n_elems*32;
 6838}
 6839
 6840// --- fasttest.I32IncrOpt.pmask_bitcurs.Access
 6841// item access
 6842inline int& fasttest::I32IncrOpt_pmask_bitcurs_Access(I32IncrOpt_pmask_bitcurs &curs) {
 6843    return curs.bit;
 6844}
 6845
 6846// --- fasttest.I32IncrOpt..GetMsgLength
 6847// Message length (uses length field)
 6848inline i32 fasttest::GetMsgLength(const fasttest::I32IncrOpt& parent) {
 6849    return i32(const_cast<fasttest::I32IncrOpt&>(parent).length);
 6850}
 6851
 6852// --- fasttest.I32IncrOpt..GetMsgMemptr
 6853// Memptr encompassing the message (uses length field)
 6854inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32IncrOpt& row) {
 6855    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32IncrOpt&>(row).length));
 6856}
 6857
 6858// --- fasttest.I32IncrOpt..Init
 6859// Set all fields to initial values.
 6860inline void fasttest::I32IncrOpt_Init(fasttest::I32IncrOpt& parent) {
 6861    parent.length = u32(ssizeof(parent) + (0));
 6862    parent.id = u32(99);
 6863    parent.pmask = u32(0);
 6864    parent.Value99 = i32(99);
 6865}
 6866inline fasttest::I32None::I32None() {
 6867    fasttest::I32None_Init(*this);
 6868}
 6869
 6870
 6871// --- fasttest.I32None.base.Castdown
 6872// Check if fasttest::TemplateHeader is an instance of I32None by checking the type field
 6873// If it is, return the pointer of target type.
 6874// Additionally, check if the length field permits valid instance of I32None.
 6875// If not successful, quietly return NULL.
 6876inline fasttest::I32None* fasttest::I32None_Castdown(fasttest::TemplateHeader &hdr) {
 6877    bool cond = hdr.id == (1);
 6878    cond &= i32(hdr.length) >= ssizeof(fasttest::I32None);
 6879    return cond ? reinterpret_cast<fasttest::I32None*>(&hdr) : NULL;
 6880}
 6881
 6882// --- fasttest.I32None.base.Castbase
 6883inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32None& parent) {
 6884    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 6885}
 6886
 6887// --- fasttest.I32None..GetMsgLength
 6888// Message length (uses length field)
 6889inline i32 fasttest::GetMsgLength(const fasttest::I32None& parent) {
 6890    return i32(const_cast<fasttest::I32None&>(parent).length);
 6891}
 6892
 6893// --- fasttest.I32None..GetMsgMemptr
 6894// Memptr encompassing the message (uses length field)
 6895inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32None& row) {
 6896    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32None&>(row).length));
 6897}
 6898
 6899// --- fasttest.I32None..Init
 6900// Set all fields to initial values.
 6901inline void fasttest::I32None_Init(fasttest::I32None& parent) {
 6902    parent.length = u32(ssizeof(parent) + (0));
 6903    parent.id = u32(1);
 6904    parent.Value = i32(0);
 6905}
 6906inline fasttest::I32NoneOpt::I32NoneOpt() {
 6907    fasttest::I32NoneOpt_Init(*this);
 6908}
 6909
 6910
 6911// --- fasttest.I32NoneOpt.base.Castdown
 6912// Check if fasttest::TemplateHeader is an instance of I32NoneOpt by checking the type field
 6913// If it is, return the pointer of target type.
 6914// Additionally, check if the length field permits valid instance of I32NoneOpt.
 6915// If not successful, quietly return NULL.
 6916inline fasttest::I32NoneOpt* fasttest::I32NoneOpt_Castdown(fasttest::TemplateHeader &hdr) {
 6917    bool cond = hdr.id == (2);
 6918    cond &= i32(hdr.length) >= ssizeof(fasttest::I32NoneOpt);
 6919    return cond ? reinterpret_cast<fasttest::I32NoneOpt*>(&hdr) : NULL;
 6920}
 6921
 6922// --- fasttest.I32NoneOpt.base.Castbase
 6923inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::I32NoneOpt& parent) {
 6924    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 6925}
 6926
 6927// --- fasttest.I32NoneOpt.pmask.N
 6928// Return constant 1
 6929inline int fasttest::pmask_N(fasttest::I32NoneOpt& parent) {
 6930    (void)parent;
 6931    return 1;
 6932}
 6933
 6934// --- fasttest.I32NoneOpt.pmask.qFind
 6935// Access value
 6936inline u32& fasttest::pmask_qFind(fasttest::I32NoneOpt& parent, int) {
 6937    return parent.pmask;
 6938}
 6939
 6940// --- fasttest.I32NoneOpt.pmask.NBits
 6941// Get max # of bits in the bitset
 6942// Return max. number of bits supported by array
 6943inline int fasttest::pmask_Nbits(fasttest::I32NoneOpt& parent) {
 6944    return pmask_N(parent) * 32;
 6945}
 6946
 6947// --- fasttest.I32NoneOpt.pmask.qGetBit
 6948// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 6949inline bool fasttest::pmask_qGetBit(fasttest::I32NoneOpt& parent, u32 bit_idx) {
 6950    u64 elem_idx = bit_idx >> 5;
 6951    u64 shift = bit_idx & 31;
 6952    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6953    return bool((elem >> shift) & 1); // extract bit
 6954}
 6955
 6956// --- fasttest.I32NoneOpt.pmask.GetBit
 6957// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 6958inline bool fasttest::pmask_GetBit(fasttest::I32NoneOpt& parent, u32 bit_idx) {
 6959    u64 elem_idx = bit_idx >> 5;
 6960    u64 shift = bit_idx & 31;
 6961    bool ret = false;
 6962    u64 lim = pmask_N(parent);
 6963    if (elem_idx < lim) {
 6964        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 6965        ret = (elem >> shift) & 1;                 // extract bit
 6966    }
 6967    return ret;
 6968}
 6969
 6970// --- fasttest.I32NoneOpt.pmask.BitsEmptyQ
 6971// Check if all the bits in the bitset are equal to zero
 6972inline bool fasttest::pmask_BitsEmptyQ(fasttest::I32NoneOpt& parent) {
 6973    bool retval = true;
 6974    u64 n = pmask_N(parent);
 6975    for (u64 i = 0; i < n; i++) {
 6976        if (pmask_qFind(parent,i) != 0) {
 6977            retval = false;
 6978            break;
 6979        }
 6980    }
 6981    return retval;
 6982}
 6983
 6984// --- fasttest.I32NoneOpt.pmask.Sum1s
 6985inline u64 fasttest::pmask_Sum1s(fasttest::I32NoneOpt& parent) {
 6986    u64 sum = 0;
 6987    u64 n = pmask_N(parent);
 6988    for (u64 i = 0; i < n; i++) {
 6989        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 6990    }
 6991    return sum;
 6992}
 6993
 6994// --- fasttest.I32NoneOpt.pmask.qClearBit
 6995// Clear bit # BIT_IDX in bit set. No bounds checking
 6996inline void fasttest::pmask_qClearBit(fasttest::I32NoneOpt& parent, u32 bit_idx) {
 6997    u64 elem_idx = bit_idx >> 5;
 6998    u64 shift = bit_idx & 31;
 6999    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 7000    elem = elem & ~(u32(1) << shift); // clear bit
 7001}
 7002
 7003// --- fasttest.I32NoneOpt.pmask.ClearBit
 7004// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 7005inline void fasttest::pmask_ClearBit(fasttest::I32NoneOpt& parent, u32 bit_idx) {
 7006    u64 elem_idx = bit_idx >> 5;
 7007    u64 shift = bit_idx & 31;
 7008    u64 lim = pmask_N(parent);
 7009    if (elem_idx < lim) {
 7010        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 7011        elem = elem & ~(u32(1) << shift); // clear bit
 7012    }
 7013}
 7014
 7015// --- fasttest.I32NoneOpt.pmask.qSetBit
 7016// Set bit # BIT_IDX in bit set. No bounds checking
 7017inline void fasttest::pmask_qSetBit(fasttest::I32NoneOpt& parent, u32 bit_idx) {
 7018    u64 elem_idx = bit_idx >> 5;
 7019    u64 shift = bit_idx & 31;
 7020    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 7021    elem = elem | (u32(1) << shift); // set bit
 7022}
 7023
 7024// --- fasttest.I32NoneOpt.pmask.SetBit
 7025// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 7026inline void fasttest::pmask_SetBit(fasttest::I32NoneOpt& parent, u32 bit_idx) {
 7027    u64 elem_idx = bit_idx >> 5;
 7028    u64 shift = bit_idx & 31;
 7029    u64 lim = pmask_N(parent);
 7030    if (elem_idx < lim) {
 7031        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 7032        elem = elem | (u32(1) << shift); // set bit
 7033    }
 7034}
 7035
 7036// --- fasttest.I32NoneOpt.pmask.qSetBitVal
 7037// Set bit # BIT_IDX in bit set. No bounds checking
 7038inline void fasttest::pmask_qSetBitVal(fasttest::I32NoneOpt& parent, u32 bit_idx, bool val) {
 7039    u64 elem_idx = bit_idx >> 5;
 7040    u64 shift = bit_idx & 31;
 7041    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 7042    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 7043}
 7044
 7045// --- fasttest.I32NoneOpt.pmask.qOrBitVal
 7046// Or bit # BIT_IDX in bit set. No bounds checking
 7047inline void fasttest::pmask_qOrBitVal(fasttest::I32NoneOpt& parent, u32 bit_idx, bool val) {
 7048    u64 elem_idx = bit_idx >> 5;
 7049    u64 shift = bit_idx & 31;
 7050    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 7051    elem = elem | (u32(val) << shift); // Or in val into elem
 7052}
 7053
 7054// --- fasttest.I32NoneOpt.pmask.ClearBitsAll
 7055// Set all bits of array to zero.
 7056// Note: this does not change what NBits will return.
 7057inline void fasttest::pmask_ClearBitsAll(fasttest::I32NoneOpt& parent) {
 7058    u64 n = pmask_N(parent);
 7059    for (u64 i = 0; i < n; i++) {
 7060        pmask_qFind(parent, i) = 0;
 7061    }
 7062}
 7063
 7064// --- fasttest.I32NoneOpt.pmask.ClearBits
 7065// Zero in PARENT any bits that are set in RHS.
 7066inline void fasttest::pmask_ClearBits(fasttest::I32NoneOpt& parent, fasttest::I32NoneOpt &rhs) {
 7067    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 7068    for (u64 i = 0; i < n; i++) {
 7069        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 7070    }
 7071}
 7072
 7073// --- fasttest.I32NoneOpt.pmask.OrBits
 7074// Set PARENT to union of two bitsets.
 7075// (This function is not named Set.. to avoid triple entendre).
 7076inline void fasttest::pmask_OrBits(fasttest::I32NoneOpt& parent, fasttest::I32NoneOpt &rhs) {
 7077    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 7078    for (u64 i = 0; i < n; i++) {
 7079        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 7080    }
 7081}
 7082
 7083// --- fasttest.I32NoneOpt.pmask.Sup
 7084// Return smallest number N such that indexes of all 1 bits are below N
 7085inline i32 fasttest::pmask_Sup(fasttest::I32NoneOpt& parent) {
 7086    u64 lim = pmask_N(parent);
 7087    i32 ret = 0;
 7088    for (int i = lim-1; i >= 0; i--) {
 7089        u32 &val = pmask_qFind(parent, i);
 7090        if (val) {
 7091            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 7092            ret = i * 32 + bitidx;
 7093            break;
 7094        }
 7095    }
 7096    return ret;
 7097}
 7098
 7099// --- fasttest.I32NoneOpt.Value.PresentQ
 7100// Return true if the field is marked in the presence mask
 7101inline bool fasttest::Value_PresentQ(fasttest::I32NoneOpt& parent) {
 7102    return pmask_qGetBit(parent, 0);
 7103}
 7104
 7105// --- fasttest.I32NoneOpt.Value.SetPresent
 7106// Set presence bit for this field in the pmask
 7107inline void fasttest::Value_SetPresent(fasttest::I32NoneOpt& parent) {
 7108    pmask_qSetBit(parent, 0); // mark presence in pmask
 7109}
 7110
 7111// --- fasttest.I32NoneOpt.Value.Present_GetBit
 7112// Return field's bit number in the pmask
 7113inline int fasttest::Value_Present_GetBit(fasttest::I32NoneOpt& parent) {
 7114    int retval = 0;
 7115    (void)parent;//only to avoid -Wunused-parameter
 7116    return retval;
 7117}
 7118
 7119// --- fasttest.I32NoneOpt.Value.Set
 7120inline void fasttest::Value_Set(fasttest::I32NoneOpt& parent, i32 rhs) {
 7121    parent.Value = rhs;
 7122    pmask_qSetBit(parent, 0); // mark presence in pmask
 7123}
 7124
 7125// --- fasttest.I32NoneOpt.pmask_bitcurs.Reset
 7126inline void fasttest::I32NoneOpt_pmask_bitcurs_Reset(I32NoneOpt_pmask_bitcurs &curs, fasttest::I32NoneOpt &parent) {
 7127    curs.elems = &pmask_qFind(parent,0);
 7128    curs.n_elems = pmask_N(parent);
 7129    curs.bit = -1;
 7130    I32NoneOpt_pmask_bitcurs_Next(curs);
 7131}
 7132
 7133// --- fasttest.I32NoneOpt.pmask_bitcurs.ValidQ
 7134// cursor points to valid item
 7135inline bool fasttest::I32NoneOpt_pmask_bitcurs_ValidQ(I32NoneOpt_pmask_bitcurs &curs) {
 7136    return curs.bit < curs.n_elems*32;
 7137}
 7138
 7139// --- fasttest.I32NoneOpt.pmask_bitcurs.Access
 7140// item access
 7141inline int& fasttest::I32NoneOpt_pmask_bitcurs_Access(I32NoneOpt_pmask_bitcurs &curs) {
 7142    return curs.bit;
 7143}
 7144
 7145// --- fasttest.I32NoneOpt..GetMsgLength
 7146// Message length (uses length field)
 7147inline i32 fasttest::GetMsgLength(const fasttest::I32NoneOpt& parent) {
 7148    return i32(const_cast<fasttest::I32NoneOpt&>(parent).length);
 7149}
 7150
 7151// --- fasttest.I32NoneOpt..GetMsgMemptr
 7152// Memptr encompassing the message (uses length field)
 7153inline algo::memptr fasttest::GetMsgMemptr(const fasttest::I32NoneOpt& row) {
 7154    return algo::memptr((u8*)&row, i32(const_cast<fasttest::I32NoneOpt&>(row).length));
 7155}
 7156
 7157// --- fasttest.I32NoneOpt..Init
 7158// Set all fields to initial values.
 7159inline void fasttest::I32NoneOpt_Init(fasttest::I32NoneOpt& parent) {
 7160    parent.length = u32(ssizeof(parent) + (0));
 7161    parent.id = u32(2);
 7162    parent.pmask = u32(0);
 7163    parent.Value = i32(0);
 7164}
 7165inline fasttest::MsgPmap::MsgPmap() {
 7166    fasttest::MsgPmap_Init(*this);
 7167}
 7168
 7169
 7170// --- fasttest.MsgPmap.base.Castdown
 7171// Check if fasttest::TemplateHeader is an instance of MsgPmap by checking the type field
 7172// If it is, return the pointer of target type.
 7173// Additionally, check if the length field permits valid instance of MsgPmap.
 7174// If not successful, quietly return NULL.
 7175inline fasttest::MsgPmap* fasttest::MsgPmap_Castdown(fasttest::TemplateHeader &hdr) {
 7176    bool cond = hdr.id == (151);
 7177    cond &= i32(hdr.length) >= ssizeof(fasttest::MsgPmap);
 7178    return cond ? reinterpret_cast<fasttest::MsgPmap*>(&hdr) : NULL;
 7179}
 7180
 7181// --- fasttest.MsgPmap.base.Castbase
 7182inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::MsgPmap& parent) {
 7183    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 7184}
 7185
 7186// --- fasttest.MsgPmap.pmask.N
 7187// Return constant 1
 7188inline int fasttest::pmask_N(fasttest::MsgPmap& parent) {
 7189    (void)parent;
 7190    return 1;
 7191}
 7192
 7193// --- fasttest.MsgPmap.pmask.qFind
 7194// Access value
 7195inline u64& fasttest::pmask_qFind(fasttest::MsgPmap& parent, int) {
 7196    return parent.pmask;
 7197}
 7198
 7199// --- fasttest.MsgPmap.pmask.NBits
 7200// Get max # of bits in the bitset
 7201// Return max. number of bits supported by array
 7202inline int fasttest::pmask_Nbits(fasttest::MsgPmap& parent) {
 7203    return pmask_N(parent) * 64;
 7204}
 7205
 7206// --- fasttest.MsgPmap.pmask.qGetBit
 7207// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 7208inline bool fasttest::pmask_qGetBit(fasttest::MsgPmap& parent, u32 bit_idx) {
 7209    u64 elem_idx = bit_idx >> 6;
 7210    u64 shift = bit_idx & 63;
 7211    u64 &elem = pmask_qFind(parent, elem_idx); // fetch element
 7212    return bool((elem >> shift) & 1); // extract bit
 7213}
 7214
 7215// --- fasttest.MsgPmap.pmask.GetBit
 7216// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 7217inline bool fasttest::pmask_GetBit(fasttest::MsgPmap& parent, u32 bit_idx) {
 7218    u64 elem_idx = bit_idx >> 6;
 7219    u64 shift = bit_idx & 63;
 7220    bool ret = false;
 7221    u64 lim = pmask_N(parent);
 7222    if (elem_idx < lim) {
 7223        u64 &elem = pmask_qFind(parent, elem_idx); // fetch element
 7224        ret = (elem >> shift) & 1;                 // extract bit
 7225    }
 7226    return ret;
 7227}
 7228
 7229// --- fasttest.MsgPmap.pmask.BitsEmptyQ
 7230// Check if all the bits in the bitset are equal to zero
 7231inline bool fasttest::pmask_BitsEmptyQ(fasttest::MsgPmap& parent) {
 7232    bool retval = true;
 7233    u64 n = pmask_N(parent);
 7234    for (u64 i = 0; i < n; i++) {
 7235        if (pmask_qFind(parent,i) != 0) {
 7236            retval = false;
 7237            break;
 7238        }
 7239    }
 7240    return retval;
 7241}
 7242
 7243// --- fasttest.MsgPmap.pmask.Sum1s
 7244inline u64 fasttest::pmask_Sum1s(fasttest::MsgPmap& parent) {
 7245    u64 sum = 0;
 7246    u64 n = pmask_N(parent);
 7247    for (u64 i = 0; i < n; i++) {
 7248        sum += algo::u64_Count1s(pmask_qFind(parent, i));
 7249    }
 7250    return sum;
 7251}
 7252
 7253// --- fasttest.MsgPmap.pmask.qClearBit
 7254// Clear bit # BIT_IDX in bit set. No bounds checking
 7255inline void fasttest::pmask_qClearBit(fasttest::MsgPmap& parent, u32 bit_idx) {
 7256    u64 elem_idx = bit_idx >> 6;
 7257    u64 shift = bit_idx & 63;
 7258    u64 &elem = pmask_qFind(parent, elem_idx); // fetch
 7259    elem = elem & ~(u64(1) << shift); // clear bit
 7260}
 7261
 7262// --- fasttest.MsgPmap.pmask.ClearBit
 7263// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 7264inline void fasttest::pmask_ClearBit(fasttest::MsgPmap& parent, u32 bit_idx) {
 7265    u64 elem_idx = bit_idx >> 6;
 7266    u64 shift = bit_idx & 63;
 7267    u64 lim = pmask_N(parent);
 7268    if (elem_idx < lim) {
 7269        u64 &elem = pmask_qFind(parent, elem_idx); // fetch
 7270        elem = elem & ~(u64(1) << shift); // clear bit
 7271    }
 7272}
 7273
 7274// --- fasttest.MsgPmap.pmask.qSetBit
 7275// Set bit # BIT_IDX in bit set. No bounds checking
 7276inline void fasttest::pmask_qSetBit(fasttest::MsgPmap& parent, u32 bit_idx) {
 7277    u64 elem_idx = bit_idx >> 6;
 7278    u64 shift = bit_idx & 63;
 7279    u64 &elem = pmask_qFind(parent, elem_idx); // fetch
 7280    elem = elem | (u64(1) << shift); // set bit
 7281}
 7282
 7283// --- fasttest.MsgPmap.pmask.SetBit
 7284// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 7285inline void fasttest::pmask_SetBit(fasttest::MsgPmap& parent, u32 bit_idx) {
 7286    u64 elem_idx = bit_idx >> 6;
 7287    u64 shift = bit_idx & 63;
 7288    u64 lim = pmask_N(parent);
 7289    if (elem_idx < lim) {
 7290        u64 &elem = pmask_qFind(parent, elem_idx); // fetch
 7291        elem = elem | (u64(1) << shift); // set bit
 7292    }
 7293}
 7294
 7295// --- fasttest.MsgPmap.pmask.qSetBitVal
 7296// Set bit # BIT_IDX in bit set. No bounds checking
 7297inline void fasttest::pmask_qSetBitVal(fasttest::MsgPmap& parent, u32 bit_idx, bool val) {
 7298    u64 elem_idx = bit_idx >> 6;
 7299    u64 shift = bit_idx & 63;
 7300    u64 &elem = pmask_qFind(parent, elem_idx); // fetch
 7301    elem = (elem & ~(u64(1) << shift)) | (u64(val) << shift); // insert new value
 7302}
 7303
 7304// --- fasttest.MsgPmap.pmask.qOrBitVal
 7305// Or bit # BIT_IDX in bit set. No bounds checking
 7306inline void fasttest::pmask_qOrBitVal(fasttest::MsgPmap& parent, u32 bit_idx, bool val) {
 7307    u64 elem_idx = bit_idx >> 6;
 7308    u64 shift = bit_idx & 63;
 7309    u64 &elem = pmask_qFind(parent, elem_idx); // fetch
 7310    elem = elem | (u64(val) << shift); // Or in val into elem
 7311}
 7312
 7313// --- fasttest.MsgPmap.pmask.ClearBitsAll
 7314// Set all bits of array to zero.
 7315// Note: this does not change what NBits will return.
 7316inline void fasttest::pmask_ClearBitsAll(fasttest::MsgPmap& parent) {
 7317    u64 n = pmask_N(parent);
 7318    for (u64 i = 0; i < n; i++) {
 7319        pmask_qFind(parent, i) = 0;
 7320    }
 7321}
 7322
 7323// --- fasttest.MsgPmap.pmask.ClearBits
 7324// Zero in PARENT any bits that are set in RHS.
 7325inline void fasttest::pmask_ClearBits(fasttest::MsgPmap& parent, fasttest::MsgPmap &rhs) {
 7326    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 7327    for (u64 i = 0; i < n; i++) {
 7328        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 7329    }
 7330}
 7331
 7332// --- fasttest.MsgPmap.pmask.OrBits
 7333// Set PARENT to union of two bitsets.
 7334// (This function is not named Set.. to avoid triple entendre).
 7335inline void fasttest::pmask_OrBits(fasttest::MsgPmap& parent, fasttest::MsgPmap &rhs) {
 7336    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 7337    for (u64 i = 0; i < n; i++) {
 7338        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 7339    }
 7340}
 7341
 7342// --- fasttest.MsgPmap.pmask.Sup
 7343// Return smallest number N such that indexes of all 1 bits are below N
 7344inline i32 fasttest::pmask_Sup(fasttest::MsgPmap& parent) {
 7345    u64 lim = pmask_N(parent);
 7346    i32 ret = 0;
 7347    for (int i = lim-1; i >= 0; i--) {
 7348        u64 &val = pmask_qFind(parent, i);
 7349        if (val) {
 7350            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 7351            ret = i * 64 + bitidx;
 7352            break;
 7353        }
 7354    }
 7355    return ret;
 7356}
 7357
 7358// --- fasttest.MsgPmap.Value1.PresentQ
 7359// Return true if the field is marked in the presence mask
 7360inline bool fasttest::Value1_PresentQ(fasttest::MsgPmap& parent) {
 7361    return pmask_qGetBit(parent, 0);
 7362}
 7363
 7364// --- fasttest.MsgPmap.Value1.SetPresent
 7365// Set presence bit for this field in the pmask
 7366inline void fasttest::Value1_SetPresent(fasttest::MsgPmap& parent) {
 7367    pmask_qSetBit(parent, 0); // mark presence in pmask
 7368}
 7369
 7370// --- fasttest.MsgPmap.Value1.Present_GetBit
 7371// Return field's bit number in the pmask
 7372inline int fasttest::Value1_Present_GetBit(fasttest::MsgPmap& parent) {
 7373    int retval = 0;
 7374    (void)parent;//only to avoid -Wunused-parameter
 7375    return retval;
 7376}
 7377
 7378// --- fasttest.MsgPmap.Value1.Get
 7379inline u32 fasttest::Value1_Get(fasttest::MsgPmap& parent) {
 7380    (void)parent;
 7381    return u32(1);
 7382}
 7383
 7384// --- fasttest.MsgPmap.Value2.PresentQ
 7385// Return true if the field is marked in the presence mask
 7386inline bool fasttest::Value2_PresentQ(fasttest::MsgPmap& parent) {
 7387    return pmask_qGetBit(parent, 11);
 7388}
 7389
 7390// --- fasttest.MsgPmap.Value2.SetPresent
 7391// Set presence bit for this field in the pmask
 7392inline void fasttest::Value2_SetPresent(fasttest::MsgPmap& parent) {
 7393    pmask_qSetBit(parent, 11); // mark presence in pmask
 7394}
 7395
 7396// --- fasttest.MsgPmap.Value2.Present_GetBit
 7397// Return field's bit number in the pmask
 7398inline int fasttest::Value2_Present_GetBit(fasttest::MsgPmap& parent) {
 7399    int retval = 11;
 7400    (void)parent;//only to avoid -Wunused-parameter
 7401    return retval;
 7402}
 7403
 7404// --- fasttest.MsgPmap.Value2.Get
 7405inline u32 fasttest::Value2_Get(fasttest::MsgPmap& parent) {
 7406    (void)parent;
 7407    return u32(1);
 7408}
 7409
 7410// --- fasttest.MsgPmap.Value3.PresentQ
 7411// Return true if the field is marked in the presence mask
 7412inline bool fasttest::Value3_PresentQ(fasttest::MsgPmap& parent) {
 7413    return pmask_qGetBit(parent, 22);
 7414}
 7415
 7416// --- fasttest.MsgPmap.Value3.SetPresent
 7417// Set presence bit for this field in the pmask
 7418inline void fasttest::Value3_SetPresent(fasttest::MsgPmap& parent) {
 7419    pmask_qSetBit(parent, 22); // mark presence in pmask
 7420}
 7421
 7422// --- fasttest.MsgPmap.Value3.Present_GetBit
 7423// Return field's bit number in the pmask
 7424inline int fasttest::Value3_Present_GetBit(fasttest::MsgPmap& parent) {
 7425    int retval = 22;
 7426    (void)parent;//only to avoid -Wunused-parameter
 7427    return retval;
 7428}
 7429
 7430// --- fasttest.MsgPmap.Value3.Get
 7431inline u32 fasttest::Value3_Get(fasttest::MsgPmap& parent) {
 7432    (void)parent;
 7433    return u32(1);
 7434}
 7435
 7436// --- fasttest.MsgPmap.Value4.PresentQ
 7437// Return true if the field is marked in the presence mask
 7438inline bool fasttest::Value4_PresentQ(fasttest::MsgPmap& parent) {
 7439    return pmask_qGetBit(parent, 33);
 7440}
 7441
 7442// --- fasttest.MsgPmap.Value4.SetPresent
 7443// Set presence bit for this field in the pmask
 7444inline void fasttest::Value4_SetPresent(fasttest::MsgPmap& parent) {
 7445    pmask_qSetBit(parent, 33); // mark presence in pmask
 7446}
 7447
 7448// --- fasttest.MsgPmap.Value4.Present_GetBit
 7449// Return field's bit number in the pmask
 7450inline int fasttest::Value4_Present_GetBit(fasttest::MsgPmap& parent) {
 7451    int retval = 33;
 7452    (void)parent;//only to avoid -Wunused-parameter
 7453    return retval;
 7454}
 7455
 7456// --- fasttest.MsgPmap.Value4.Get
 7457inline u32 fasttest::Value4_Get(fasttest::MsgPmap& parent) {
 7458    (void)parent;
 7459    return u32(1);
 7460}
 7461
 7462// --- fasttest.MsgPmap.Value5.PresentQ
 7463// Return true if the field is marked in the presence mask
 7464inline bool fasttest::Value5_PresentQ(fasttest::MsgPmap& parent) {
 7465    return pmask_qGetBit(parent, 44);
 7466}
 7467
 7468// --- fasttest.MsgPmap.Value5.SetPresent
 7469// Set presence bit for this field in the pmask
 7470inline void fasttest::Value5_SetPresent(fasttest::MsgPmap& parent) {
 7471    pmask_qSetBit(parent, 44); // mark presence in pmask
 7472}
 7473
 7474// --- fasttest.MsgPmap.Value5.Present_GetBit
 7475// Return field's bit number in the pmask
 7476inline int fasttest::Value5_Present_GetBit(fasttest::MsgPmap& parent) {
 7477    int retval = 44;
 7478    (void)parent;//only to avoid -Wunused-parameter
 7479    return retval;
 7480}
 7481
 7482// --- fasttest.MsgPmap.Value5.Get
 7483inline u32 fasttest::Value5_Get(fasttest::MsgPmap& parent) {
 7484    (void)parent;
 7485    return u32(1);
 7486}
 7487
 7488// --- fasttest.MsgPmap.Value6.PresentQ
 7489// Return true if the field is marked in the presence mask
 7490inline bool fasttest::Value6_PresentQ(fasttest::MsgPmap& parent) {
 7491    return pmask_qGetBit(parent, 55);
 7492}
 7493
 7494// --- fasttest.MsgPmap.Value6.SetPresent
 7495// Set presence bit for this field in the pmask
 7496inline void fasttest::Value6_SetPresent(fasttest::MsgPmap& parent) {
 7497    pmask_qSetBit(parent, 55); // mark presence in pmask
 7498}
 7499
 7500// --- fasttest.MsgPmap.Value6.Present_GetBit
 7501// Return field's bit number in the pmask
 7502inline int fasttest::Value6_Present_GetBit(fasttest::MsgPmap& parent) {
 7503    int retval = 55;
 7504    (void)parent;//only to avoid -Wunused-parameter
 7505    return retval;
 7506}
 7507
 7508// --- fasttest.MsgPmap.Value6.Get
 7509inline u32 fasttest::Value6_Get(fasttest::MsgPmap& parent) {
 7510    (void)parent;
 7511    return u32(1);
 7512}
 7513
 7514// --- fasttest.MsgPmap.Value7.PresentQ
 7515// Return true if the field is marked in the presence mask
 7516inline bool fasttest::Value7_PresentQ(fasttest::MsgPmap& parent) {
 7517    return pmask_qGetBit(parent, 60);
 7518}
 7519
 7520// --- fasttest.MsgPmap.Value7.SetPresent
 7521// Set presence bit for this field in the pmask
 7522inline void fasttest::Value7_SetPresent(fasttest::MsgPmap& parent) {
 7523    pmask_qSetBit(parent, 60); // mark presence in pmask
 7524}
 7525
 7526// --- fasttest.MsgPmap.Value7.Present_GetBit
 7527// Return field's bit number in the pmask
 7528inline int fasttest::Value7_Present_GetBit(fasttest::MsgPmap& parent) {
 7529    int retval = 60;
 7530    (void)parent;//only to avoid -Wunused-parameter
 7531    return retval;
 7532}
 7533
 7534// --- fasttest.MsgPmap.Value7.Get
 7535inline u32 fasttest::Value7_Get(fasttest::MsgPmap& parent) {
 7536    (void)parent;
 7537    return u32(1);
 7538}
 7539
 7540// --- fasttest.MsgPmap.Value8.PresentQ
 7541// Return true if the field is marked in the presence mask
 7542inline bool fasttest::Value8_PresentQ(fasttest::MsgPmap& parent) {
 7543    return pmask_qGetBit(parent, 61);
 7544}
 7545
 7546// --- fasttest.MsgPmap.Value8.SetPresent
 7547// Set presence bit for this field in the pmask
 7548inline void fasttest::Value8_SetPresent(fasttest::MsgPmap& parent) {
 7549    pmask_qSetBit(parent, 61); // mark presence in pmask
 7550}
 7551
 7552// --- fasttest.MsgPmap.Value8.Present_GetBit
 7553// Return field's bit number in the pmask
 7554inline int fasttest::Value8_Present_GetBit(fasttest::MsgPmap& parent) {
 7555    int retval = 61;
 7556    (void)parent;//only to avoid -Wunused-parameter
 7557    return retval;
 7558}
 7559
 7560// --- fasttest.MsgPmap.Value8.Get
 7561inline u32 fasttest::Value8_Get(fasttest::MsgPmap& parent) {
 7562    (void)parent;
 7563    return u32(1);
 7564}
 7565
 7566// --- fasttest.MsgPmap.Value9.PresentQ
 7567// Return true if the field is marked in the presence mask
 7568inline bool fasttest::Value9_PresentQ(fasttest::MsgPmap& parent) {
 7569    return pmask_qGetBit(parent, 62);
 7570}
 7571
 7572// --- fasttest.MsgPmap.Value9.SetPresent
 7573// Set presence bit for this field in the pmask
 7574inline void fasttest::Value9_SetPresent(fasttest::MsgPmap& parent) {
 7575    pmask_qSetBit(parent, 62); // mark presence in pmask
 7576}
 7577
 7578// --- fasttest.MsgPmap.Value9.Present_GetBit
 7579// Return field's bit number in the pmask
 7580inline int fasttest::Value9_Present_GetBit(fasttest::MsgPmap& parent) {
 7581    int retval = 62;
 7582    (void)parent;//only to avoid -Wunused-parameter
 7583    return retval;
 7584}
 7585
 7586// --- fasttest.MsgPmap.Value9.Get
 7587inline u32 fasttest::Value9_Get(fasttest::MsgPmap& parent) {
 7588    (void)parent;
 7589    return u32(1);
 7590}
 7591
 7592// --- fasttest.MsgPmap.Value10.PresentQ
 7593// Return true if the field is marked in the presence mask
 7594inline bool fasttest::Value10_PresentQ(fasttest::MsgPmap& parent) {
 7595    return pmask_qGetBit(parent, 1);
 7596}
 7597
 7598// --- fasttest.MsgPmap.Value10.SetPresent
 7599// Set presence bit for this field in the pmask
 7600inline void fasttest::Value10_SetPresent(fasttest::MsgPmap& parent) {
 7601    pmask_qSetBit(parent, 1); // mark presence in pmask
 7602}
 7603
 7604// --- fasttest.MsgPmap.Value10.Present_GetBit
 7605// Return field's bit number in the pmask
 7606inline int fasttest::Value10_Present_GetBit(fasttest::MsgPmap& parent) {
 7607    int retval = 1;
 7608    (void)parent;//only to avoid -Wunused-parameter
 7609    return retval;
 7610}
 7611
 7612// --- fasttest.MsgPmap.Value10.Get
 7613inline u32 fasttest::Value10_Get(fasttest::MsgPmap& parent) {
 7614    (void)parent;
 7615    return u32(1);
 7616}
 7617
 7618// --- fasttest.MsgPmap.Value11.PresentQ
 7619// Return true if the field is marked in the presence mask
 7620inline bool fasttest::Value11_PresentQ(fasttest::MsgPmap& parent) {
 7621    return pmask_qGetBit(parent, 2);
 7622}
 7623
 7624// --- fasttest.MsgPmap.Value11.SetPresent
 7625// Set presence bit for this field in the pmask
 7626inline void fasttest::Value11_SetPresent(fasttest::MsgPmap& parent) {
 7627    pmask_qSetBit(parent, 2); // mark presence in pmask
 7628}
 7629
 7630// --- fasttest.MsgPmap.Value11.Present_GetBit
 7631// Return field's bit number in the pmask
 7632inline int fasttest::Value11_Present_GetBit(fasttest::MsgPmap& parent) {
 7633    int retval = 2;
 7634    (void)parent;//only to avoid -Wunused-parameter
 7635    return retval;
 7636}
 7637
 7638// --- fasttest.MsgPmap.Value11.Get
 7639inline u32 fasttest::Value11_Get(fasttest::MsgPmap& parent) {
 7640    (void)parent;
 7641    return u32(1);
 7642}
 7643
 7644// --- fasttest.MsgPmap.Value12.PresentQ
 7645// Return true if the field is marked in the presence mask
 7646inline bool fasttest::Value12_PresentQ(fasttest::MsgPmap& parent) {
 7647    return pmask_qGetBit(parent, 3);
 7648}
 7649
 7650// --- fasttest.MsgPmap.Value12.SetPresent
 7651// Set presence bit for this field in the pmask
 7652inline void fasttest::Value12_SetPresent(fasttest::MsgPmap& parent) {
 7653    pmask_qSetBit(parent, 3); // mark presence in pmask
 7654}
 7655
 7656// --- fasttest.MsgPmap.Value12.Present_GetBit
 7657// Return field's bit number in the pmask
 7658inline int fasttest::Value12_Present_GetBit(fasttest::MsgPmap& parent) {
 7659    int retval = 3;
 7660    (void)parent;//only to avoid -Wunused-parameter
 7661    return retval;
 7662}
 7663
 7664// --- fasttest.MsgPmap.Value12.Get
 7665inline u32 fasttest::Value12_Get(fasttest::MsgPmap& parent) {
 7666    (void)parent;
 7667    return u32(1);
 7668}
 7669
 7670// --- fasttest.MsgPmap.Value13.PresentQ
 7671// Return true if the field is marked in the presence mask
 7672inline bool fasttest::Value13_PresentQ(fasttest::MsgPmap& parent) {
 7673    return pmask_qGetBit(parent, 4);
 7674}
 7675
 7676// --- fasttest.MsgPmap.Value13.SetPresent
 7677// Set presence bit for this field in the pmask
 7678inline void fasttest::Value13_SetPresent(fasttest::MsgPmap& parent) {
 7679    pmask_qSetBit(parent, 4); // mark presence in pmask
 7680}
 7681
 7682// --- fasttest.MsgPmap.Value13.Present_GetBit
 7683// Return field's bit number in the pmask
 7684inline int fasttest::Value13_Present_GetBit(fasttest::MsgPmap& parent) {
 7685    int retval = 4;
 7686    (void)parent;//only to avoid -Wunused-parameter
 7687    return retval;
 7688}
 7689
 7690// --- fasttest.MsgPmap.Value13.Get
 7691inline u32 fasttest::Value13_Get(fasttest::MsgPmap& parent) {
 7692    (void)parent;
 7693    return u32(1);
 7694}
 7695
 7696// --- fasttest.MsgPmap.Value14.PresentQ
 7697// Return true if the field is marked in the presence mask
 7698inline bool fasttest::Value14_PresentQ(fasttest::MsgPmap& parent) {
 7699    return pmask_qGetBit(parent, 5);
 7700}
 7701
 7702// --- fasttest.MsgPmap.Value14.SetPresent
 7703// Set presence bit for this field in the pmask
 7704inline void fasttest::Value14_SetPresent(fasttest::MsgPmap& parent) {
 7705    pmask_qSetBit(parent, 5); // mark presence in pmask
 7706}
 7707
 7708// --- fasttest.MsgPmap.Value14.Present_GetBit
 7709// Return field's bit number in the pmask
 7710inline int fasttest::Value14_Present_GetBit(fasttest::MsgPmap& parent) {
 7711    int retval = 5;
 7712    (void)parent;//only to avoid -Wunused-parameter
 7713    return retval;
 7714}
 7715
 7716// --- fasttest.MsgPmap.Value14.Get
 7717inline u32 fasttest::Value14_Get(fasttest::MsgPmap& parent) {
 7718    (void)parent;
 7719    return u32(1);
 7720}
 7721
 7722// --- fasttest.MsgPmap.Value15.PresentQ
 7723// Return true if the field is marked in the presence mask
 7724inline bool fasttest::Value15_PresentQ(fasttest::MsgPmap& parent) {
 7725    return pmask_qGetBit(parent, 6);
 7726}
 7727
 7728// --- fasttest.MsgPmap.Value15.SetPresent
 7729// Set presence bit for this field in the pmask
 7730inline void fasttest::Value15_SetPresent(fasttest::MsgPmap& parent) {
 7731    pmask_qSetBit(parent, 6); // mark presence in pmask
 7732}
 7733
 7734// --- fasttest.MsgPmap.Value15.Present_GetBit
 7735// Return field's bit number in the pmask
 7736inline int fasttest::Value15_Present_GetBit(fasttest::MsgPmap& parent) {
 7737    int retval = 6;
 7738    (void)parent;//only to avoid -Wunused-parameter
 7739    return retval;
 7740}
 7741
 7742// --- fasttest.MsgPmap.Value15.Get
 7743inline u32 fasttest::Value15_Get(fasttest::MsgPmap& parent) {
 7744    (void)parent;
 7745    return u32(1);
 7746}
 7747
 7748// --- fasttest.MsgPmap.Value16.PresentQ
 7749// Return true if the field is marked in the presence mask
 7750inline bool fasttest::Value16_PresentQ(fasttest::MsgPmap& parent) {
 7751    return pmask_qGetBit(parent, 7);
 7752}
 7753
 7754// --- fasttest.MsgPmap.Value16.SetPresent
 7755// Set presence bit for this field in the pmask
 7756inline void fasttest::Value16_SetPresent(fasttest::MsgPmap& parent) {
 7757    pmask_qSetBit(parent, 7); // mark presence in pmask
 7758}
 7759
 7760// --- fasttest.MsgPmap.Value16.Present_GetBit
 7761// Return field's bit number in the pmask
 7762inline int fasttest::Value16_Present_GetBit(fasttest::MsgPmap& parent) {
 7763    int retval = 7;
 7764    (void)parent;//only to avoid -Wunused-parameter
 7765    return retval;
 7766}
 7767
 7768// --- fasttest.MsgPmap.Value16.Get
 7769inline u32 fasttest::Value16_Get(fasttest::MsgPmap& parent) {
 7770    (void)parent;
 7771    return u32(1);
 7772}
 7773
 7774// --- fasttest.MsgPmap.Value17.PresentQ
 7775// Return true if the field is marked in the presence mask
 7776inline bool fasttest::Value17_PresentQ(fasttest::MsgPmap& parent) {
 7777    return pmask_qGetBit(parent, 8);
 7778}
 7779
 7780// --- fasttest.MsgPmap.Value17.SetPresent
 7781// Set presence bit for this field in the pmask
 7782inline void fasttest::Value17_SetPresent(fasttest::MsgPmap& parent) {
 7783    pmask_qSetBit(parent, 8); // mark presence in pmask
 7784}
 7785
 7786// --- fasttest.MsgPmap.Value17.Present_GetBit
 7787// Return field's bit number in the pmask
 7788inline int fasttest::Value17_Present_GetBit(fasttest::MsgPmap& parent) {
 7789    int retval = 8;
 7790    (void)parent;//only to avoid -Wunused-parameter
 7791    return retval;
 7792}
 7793
 7794// --- fasttest.MsgPmap.Value17.Get
 7795inline u32 fasttest::Value17_Get(fasttest::MsgPmap& parent) {
 7796    (void)parent;
 7797    return u32(1);
 7798}
 7799
 7800// --- fasttest.MsgPmap.Value18.PresentQ
 7801// Return true if the field is marked in the presence mask
 7802inline bool fasttest::Value18_PresentQ(fasttest::MsgPmap& parent) {
 7803    return pmask_qGetBit(parent, 9);
 7804}
 7805
 7806// --- fasttest.MsgPmap.Value18.SetPresent
 7807// Set presence bit for this field in the pmask
 7808inline void fasttest::Value18_SetPresent(fasttest::MsgPmap& parent) {
 7809    pmask_qSetBit(parent, 9); // mark presence in pmask
 7810}
 7811
 7812// --- fasttest.MsgPmap.Value18.Present_GetBit
 7813// Return field's bit number in the pmask
 7814inline int fasttest::Value18_Present_GetBit(fasttest::MsgPmap& parent) {
 7815    int retval = 9;
 7816    (void)parent;//only to avoid -Wunused-parameter
 7817    return retval;
 7818}
 7819
 7820// --- fasttest.MsgPmap.Value18.Get
 7821inline u32 fasttest::Value18_Get(fasttest::MsgPmap& parent) {
 7822    (void)parent;
 7823    return u32(1);
 7824}
 7825
 7826// --- fasttest.MsgPmap.Value19.PresentQ
 7827// Return true if the field is marked in the presence mask
 7828inline bool fasttest::Value19_PresentQ(fasttest::MsgPmap& parent) {
 7829    return pmask_qGetBit(parent, 10);
 7830}
 7831
 7832// --- fasttest.MsgPmap.Value19.SetPresent
 7833// Set presence bit for this field in the pmask
 7834inline void fasttest::Value19_SetPresent(fasttest::MsgPmap& parent) {
 7835    pmask_qSetBit(parent, 10); // mark presence in pmask
 7836}
 7837
 7838// --- fasttest.MsgPmap.Value19.Present_GetBit
 7839// Return field's bit number in the pmask
 7840inline int fasttest::Value19_Present_GetBit(fasttest::MsgPmap& parent) {
 7841    int retval = 10;
 7842    (void)parent;//only to avoid -Wunused-parameter
 7843    return retval;
 7844}
 7845
 7846// --- fasttest.MsgPmap.Value19.Get
 7847inline u32 fasttest::Value19_Get(fasttest::MsgPmap& parent) {
 7848    (void)parent;
 7849    return u32(1);
 7850}
 7851
 7852// --- fasttest.MsgPmap.Value20.PresentQ
 7853// Return true if the field is marked in the presence mask
 7854inline bool fasttest::Value20_PresentQ(fasttest::MsgPmap& parent) {
 7855    return pmask_qGetBit(parent, 12);
 7856}
 7857
 7858// --- fasttest.MsgPmap.Value20.SetPresent
 7859// Set presence bit for this field in the pmask
 7860inline void fasttest::Value20_SetPresent(fasttest::MsgPmap& parent) {
 7861    pmask_qSetBit(parent, 12); // mark presence in pmask
 7862}
 7863
 7864// --- fasttest.MsgPmap.Value20.Present_GetBit
 7865// Return field's bit number in the pmask
 7866inline int fasttest::Value20_Present_GetBit(fasttest::MsgPmap& parent) {
 7867    int retval = 12;
 7868    (void)parent;//only to avoid -Wunused-parameter
 7869    return retval;
 7870}
 7871
 7872// --- fasttest.MsgPmap.Value20.Get
 7873inline u32 fasttest::Value20_Get(fasttest::MsgPmap& parent) {
 7874    (void)parent;
 7875    return u32(1);
 7876}
 7877
 7878// --- fasttest.MsgPmap.Value21.PresentQ
 7879// Return true if the field is marked in the presence mask
 7880inline bool fasttest::Value21_PresentQ(fasttest::MsgPmap& parent) {
 7881    return pmask_qGetBit(parent, 13);
 7882}
 7883
 7884// --- fasttest.MsgPmap.Value21.SetPresent
 7885// Set presence bit for this field in the pmask
 7886inline void fasttest::Value21_SetPresent(fasttest::MsgPmap& parent) {
 7887    pmask_qSetBit(parent, 13); // mark presence in pmask
 7888}
 7889
 7890// --- fasttest.MsgPmap.Value21.Present_GetBit
 7891// Return field's bit number in the pmask
 7892inline int fasttest::Value21_Present_GetBit(fasttest::MsgPmap& parent) {
 7893    int retval = 13;
 7894    (void)parent;//only to avoid -Wunused-parameter
 7895    return retval;
 7896}
 7897
 7898// --- fasttest.MsgPmap.Value21.Get
 7899inline u32 fasttest::Value21_Get(fasttest::MsgPmap& parent) {
 7900    (void)parent;
 7901    return u32(1);
 7902}
 7903
 7904// --- fasttest.MsgPmap.Value22.PresentQ
 7905// Return true if the field is marked in the presence mask
 7906inline bool fasttest::Value22_PresentQ(fasttest::MsgPmap& parent) {
 7907    return pmask_qGetBit(parent, 14);
 7908}
 7909
 7910// --- fasttest.MsgPmap.Value22.SetPresent
 7911// Set presence bit for this field in the pmask
 7912inline void fasttest::Value22_SetPresent(fasttest::MsgPmap& parent) {
 7913    pmask_qSetBit(parent, 14); // mark presence in pmask
 7914}
 7915
 7916// --- fasttest.MsgPmap.Value22.Present_GetBit
 7917// Return field's bit number in the pmask
 7918inline int fasttest::Value22_Present_GetBit(fasttest::MsgPmap& parent) {
 7919    int retval = 14;
 7920    (void)parent;//only to avoid -Wunused-parameter
 7921    return retval;
 7922}
 7923
 7924// --- fasttest.MsgPmap.Value22.Get
 7925inline u32 fasttest::Value22_Get(fasttest::MsgPmap& parent) {
 7926    (void)parent;
 7927    return u32(1);
 7928}
 7929
 7930// --- fasttest.MsgPmap.Value23.PresentQ
 7931// Return true if the field is marked in the presence mask
 7932inline bool fasttest::Value23_PresentQ(fasttest::MsgPmap& parent) {
 7933    return pmask_qGetBit(parent, 15);
 7934}
 7935
 7936// --- fasttest.MsgPmap.Value23.SetPresent
 7937// Set presence bit for this field in the pmask
 7938inline void fasttest::Value23_SetPresent(fasttest::MsgPmap& parent) {
 7939    pmask_qSetBit(parent, 15); // mark presence in pmask
 7940}
 7941
 7942// --- fasttest.MsgPmap.Value23.Present_GetBit
 7943// Return field's bit number in the pmask
 7944inline int fasttest::Value23_Present_GetBit(fasttest::MsgPmap& parent) {
 7945    int retval = 15;
 7946    (void)parent;//only to avoid -Wunused-parameter
 7947    return retval;
 7948}
 7949
 7950// --- fasttest.MsgPmap.Value23.Get
 7951inline u32 fasttest::Value23_Get(fasttest::MsgPmap& parent) {
 7952    (void)parent;
 7953    return u32(1);
 7954}
 7955
 7956// --- fasttest.MsgPmap.Value24.PresentQ
 7957// Return true if the field is marked in the presence mask
 7958inline bool fasttest::Value24_PresentQ(fasttest::MsgPmap& parent) {
 7959    return pmask_qGetBit(parent, 16);
 7960}
 7961
 7962// --- fasttest.MsgPmap.Value24.SetPresent
 7963// Set presence bit for this field in the pmask
 7964inline void fasttest::Value24_SetPresent(fasttest::MsgPmap& parent) {
 7965    pmask_qSetBit(parent, 16); // mark presence in pmask
 7966}
 7967
 7968// --- fasttest.MsgPmap.Value24.Present_GetBit
 7969// Return field's bit number in the pmask
 7970inline int fasttest::Value24_Present_GetBit(fasttest::MsgPmap& parent) {
 7971    int retval = 16;
 7972    (void)parent;//only to avoid -Wunused-parameter
 7973    return retval;
 7974}
 7975
 7976// --- fasttest.MsgPmap.Value24.Get
 7977inline u32 fasttest::Value24_Get(fasttest::MsgPmap& parent) {
 7978    (void)parent;
 7979    return u32(1);
 7980}
 7981
 7982// --- fasttest.MsgPmap.Value25.PresentQ
 7983// Return true if the field is marked in the presence mask
 7984inline bool fasttest::Value25_PresentQ(fasttest::MsgPmap& parent) {
 7985    return pmask_qGetBit(parent, 17);
 7986}
 7987
 7988// --- fasttest.MsgPmap.Value25.SetPresent
 7989// Set presence bit for this field in the pmask
 7990inline void fasttest::Value25_SetPresent(fasttest::MsgPmap& parent) {
 7991    pmask_qSetBit(parent, 17); // mark presence in pmask
 7992}
 7993
 7994// --- fasttest.MsgPmap.Value25.Present_GetBit
 7995// Return field's bit number in the pmask
 7996inline int fasttest::Value25_Present_GetBit(fasttest::MsgPmap& parent) {
 7997    int retval = 17;
 7998    (void)parent;//only to avoid -Wunused-parameter
 7999    return retval;
 8000}
 8001
 8002// --- fasttest.MsgPmap.Value25.Get
 8003inline u32 fasttest::Value25_Get(fasttest::MsgPmap& parent) {
 8004    (void)parent;
 8005    return u32(1);
 8006}
 8007
 8008// --- fasttest.MsgPmap.Value26.PresentQ
 8009// Return true if the field is marked in the presence mask
 8010inline bool fasttest::Value26_PresentQ(fasttest::MsgPmap& parent) {
 8011    return pmask_qGetBit(parent, 18);
 8012}
 8013
 8014// --- fasttest.MsgPmap.Value26.SetPresent
 8015// Set presence bit for this field in the pmask
 8016inline void fasttest::Value26_SetPresent(fasttest::MsgPmap& parent) {
 8017    pmask_qSetBit(parent, 18); // mark presence in pmask
 8018}
 8019
 8020// --- fasttest.MsgPmap.Value26.Present_GetBit
 8021// Return field's bit number in the pmask
 8022inline int fasttest::Value26_Present_GetBit(fasttest::MsgPmap& parent) {
 8023    int retval = 18;
 8024    (void)parent;//only to avoid -Wunused-parameter
 8025    return retval;
 8026}
 8027
 8028// --- fasttest.MsgPmap.Value26.Get
 8029inline u32 fasttest::Value26_Get(fasttest::MsgPmap& parent) {
 8030    (void)parent;
 8031    return u32(1);
 8032}
 8033
 8034// --- fasttest.MsgPmap.Value27.PresentQ
 8035// Return true if the field is marked in the presence mask
 8036inline bool fasttest::Value27_PresentQ(fasttest::MsgPmap& parent) {
 8037    return pmask_qGetBit(parent, 19);
 8038}
 8039
 8040// --- fasttest.MsgPmap.Value27.SetPresent
 8041// Set presence bit for this field in the pmask
 8042inline void fasttest::Value27_SetPresent(fasttest::MsgPmap& parent) {
 8043    pmask_qSetBit(parent, 19); // mark presence in pmask
 8044}
 8045
 8046// --- fasttest.MsgPmap.Value27.Present_GetBit
 8047// Return field's bit number in the pmask
 8048inline int fasttest::Value27_Present_GetBit(fasttest::MsgPmap& parent) {
 8049    int retval = 19;
 8050    (void)parent;//only to avoid -Wunused-parameter
 8051    return retval;
 8052}
 8053
 8054// --- fasttest.MsgPmap.Value27.Get
 8055inline u32 fasttest::Value27_Get(fasttest::MsgPmap& parent) {
 8056    (void)parent;
 8057    return u32(1);
 8058}
 8059
 8060// --- fasttest.MsgPmap.Value28.PresentQ
 8061// Return true if the field is marked in the presence mask
 8062inline bool fasttest::Value28_PresentQ(fasttest::MsgPmap& parent) {
 8063    return pmask_qGetBit(parent, 20);
 8064}
 8065
 8066// --- fasttest.MsgPmap.Value28.SetPresent
 8067// Set presence bit for this field in the pmask
 8068inline void fasttest::Value28_SetPresent(fasttest::MsgPmap& parent) {
 8069    pmask_qSetBit(parent, 20); // mark presence in pmask
 8070}
 8071
 8072// --- fasttest.MsgPmap.Value28.Present_GetBit
 8073// Return field's bit number in the pmask
 8074inline int fasttest::Value28_Present_GetBit(fasttest::MsgPmap& parent) {
 8075    int retval = 20;
 8076    (void)parent;//only to avoid -Wunused-parameter
 8077    return retval;
 8078}
 8079
 8080// --- fasttest.MsgPmap.Value28.Get
 8081inline u32 fasttest::Value28_Get(fasttest::MsgPmap& parent) {
 8082    (void)parent;
 8083    return u32(1);
 8084}
 8085
 8086// --- fasttest.MsgPmap.Value29.PresentQ
 8087// Return true if the field is marked in the presence mask
 8088inline bool fasttest::Value29_PresentQ(fasttest::MsgPmap& parent) {
 8089    return pmask_qGetBit(parent, 21);
 8090}
 8091
 8092// --- fasttest.MsgPmap.Value29.SetPresent
 8093// Set presence bit for this field in the pmask
 8094inline void fasttest::Value29_SetPresent(fasttest::MsgPmap& parent) {
 8095    pmask_qSetBit(parent, 21); // mark presence in pmask
 8096}
 8097
 8098// --- fasttest.MsgPmap.Value29.Present_GetBit
 8099// Return field's bit number in the pmask
 8100inline int fasttest::Value29_Present_GetBit(fasttest::MsgPmap& parent) {
 8101    int retval = 21;
 8102    (void)parent;//only to avoid -Wunused-parameter
 8103    return retval;
 8104}
 8105
 8106// --- fasttest.MsgPmap.Value29.Get
 8107inline u32 fasttest::Value29_Get(fasttest::MsgPmap& parent) {
 8108    (void)parent;
 8109    return u32(1);
 8110}
 8111
 8112// --- fasttest.MsgPmap.Value30.PresentQ
 8113// Return true if the field is marked in the presence mask
 8114inline bool fasttest::Value30_PresentQ(fasttest::MsgPmap& parent) {
 8115    return pmask_qGetBit(parent, 23);
 8116}
 8117
 8118// --- fasttest.MsgPmap.Value30.SetPresent
 8119// Set presence bit for this field in the pmask
 8120inline void fasttest::Value30_SetPresent(fasttest::MsgPmap& parent) {
 8121    pmask_qSetBit(parent, 23); // mark presence in pmask
 8122}
 8123
 8124// --- fasttest.MsgPmap.Value30.Present_GetBit
 8125// Return field's bit number in the pmask
 8126inline int fasttest::Value30_Present_GetBit(fasttest::MsgPmap& parent) {
 8127    int retval = 23;
 8128    (void)parent;//only to avoid -Wunused-parameter
 8129    return retval;
 8130}
 8131
 8132// --- fasttest.MsgPmap.Value30.Get
 8133inline u32 fasttest::Value30_Get(fasttest::MsgPmap& parent) {
 8134    (void)parent;
 8135    return u32(1);
 8136}
 8137
 8138// --- fasttest.MsgPmap.Value31.PresentQ
 8139// Return true if the field is marked in the presence mask
 8140inline bool fasttest::Value31_PresentQ(fasttest::MsgPmap& parent) {
 8141    return pmask_qGetBit(parent, 24);
 8142}
 8143
 8144// --- fasttest.MsgPmap.Value31.SetPresent
 8145// Set presence bit for this field in the pmask
 8146inline void fasttest::Value31_SetPresent(fasttest::MsgPmap& parent) {
 8147    pmask_qSetBit(parent, 24); // mark presence in pmask
 8148}
 8149
 8150// --- fasttest.MsgPmap.Value31.Present_GetBit
 8151// Return field's bit number in the pmask
 8152inline int fasttest::Value31_Present_GetBit(fasttest::MsgPmap& parent) {
 8153    int retval = 24;
 8154    (void)parent;//only to avoid -Wunused-parameter
 8155    return retval;
 8156}
 8157
 8158// --- fasttest.MsgPmap.Value31.Get
 8159inline u32 fasttest::Value31_Get(fasttest::MsgPmap& parent) {
 8160    (void)parent;
 8161    return u32(1);
 8162}
 8163
 8164// --- fasttest.MsgPmap.Value32.PresentQ
 8165// Return true if the field is marked in the presence mask
 8166inline bool fasttest::Value32_PresentQ(fasttest::MsgPmap& parent) {
 8167    return pmask_qGetBit(parent, 25);
 8168}
 8169
 8170// --- fasttest.MsgPmap.Value32.SetPresent
 8171// Set presence bit for this field in the pmask
 8172inline void fasttest::Value32_SetPresent(fasttest::MsgPmap& parent) {
 8173    pmask_qSetBit(parent, 25); // mark presence in pmask
 8174}
 8175
 8176// --- fasttest.MsgPmap.Value32.Present_GetBit
 8177// Return field's bit number in the pmask
 8178inline int fasttest::Value32_Present_GetBit(fasttest::MsgPmap& parent) {
 8179    int retval = 25;
 8180    (void)parent;//only to avoid -Wunused-parameter
 8181    return retval;
 8182}
 8183
 8184// --- fasttest.MsgPmap.Value32.Get
 8185inline u32 fasttest::Value32_Get(fasttest::MsgPmap& parent) {
 8186    (void)parent;
 8187    return u32(1);
 8188}
 8189
 8190// --- fasttest.MsgPmap.Value33.PresentQ
 8191// Return true if the field is marked in the presence mask
 8192inline bool fasttest::Value33_PresentQ(fasttest::MsgPmap& parent) {
 8193    return pmask_qGetBit(parent, 26);
 8194}
 8195
 8196// --- fasttest.MsgPmap.Value33.SetPresent
 8197// Set presence bit for this field in the pmask
 8198inline void fasttest::Value33_SetPresent(fasttest::MsgPmap& parent) {
 8199    pmask_qSetBit(parent, 26); // mark presence in pmask
 8200}
 8201
 8202// --- fasttest.MsgPmap.Value33.Present_GetBit
 8203// Return field's bit number in the pmask
 8204inline int fasttest::Value33_Present_GetBit(fasttest::MsgPmap& parent) {
 8205    int retval = 26;
 8206    (void)parent;//only to avoid -Wunused-parameter
 8207    return retval;
 8208}
 8209
 8210// --- fasttest.MsgPmap.Value33.Get
 8211inline u32 fasttest::Value33_Get(fasttest::MsgPmap& parent) {
 8212    (void)parent;
 8213    return u32(1);
 8214}
 8215
 8216// --- fasttest.MsgPmap.Value34.PresentQ
 8217// Return true if the field is marked in the presence mask
 8218inline bool fasttest::Value34_PresentQ(fasttest::MsgPmap& parent) {
 8219    return pmask_qGetBit(parent, 27);
 8220}
 8221
 8222// --- fasttest.MsgPmap.Value34.SetPresent
 8223// Set presence bit for this field in the pmask
 8224inline void fasttest::Value34_SetPresent(fasttest::MsgPmap& parent) {
 8225    pmask_qSetBit(parent, 27); // mark presence in pmask
 8226}
 8227
 8228// --- fasttest.MsgPmap.Value34.Present_GetBit
 8229// Return field's bit number in the pmask
 8230inline int fasttest::Value34_Present_GetBit(fasttest::MsgPmap& parent) {
 8231    int retval = 27;
 8232    (void)parent;//only to avoid -Wunused-parameter
 8233    return retval;
 8234}
 8235
 8236// --- fasttest.MsgPmap.Value34.Get
 8237inline u32 fasttest::Value34_Get(fasttest::MsgPmap& parent) {
 8238    (void)parent;
 8239    return u32(1);
 8240}
 8241
 8242// --- fasttest.MsgPmap.Value35.PresentQ
 8243// Return true if the field is marked in the presence mask
 8244inline bool fasttest::Value35_PresentQ(fasttest::MsgPmap& parent) {
 8245    return pmask_qGetBit(parent, 28);
 8246}
 8247
 8248// --- fasttest.MsgPmap.Value35.SetPresent
 8249// Set presence bit for this field in the pmask
 8250inline void fasttest::Value35_SetPresent(fasttest::MsgPmap& parent) {
 8251    pmask_qSetBit(parent, 28); // mark presence in pmask
 8252}
 8253
 8254// --- fasttest.MsgPmap.Value35.Present_GetBit
 8255// Return field's bit number in the pmask
 8256inline int fasttest::Value35_Present_GetBit(fasttest::MsgPmap& parent) {
 8257    int retval = 28;
 8258    (void)parent;//only to avoid -Wunused-parameter
 8259    return retval;
 8260}
 8261
 8262// --- fasttest.MsgPmap.Value35.Get
 8263inline u32 fasttest::Value35_Get(fasttest::MsgPmap& parent) {
 8264    (void)parent;
 8265    return u32(1);
 8266}
 8267
 8268// --- fasttest.MsgPmap.Value36.PresentQ
 8269// Return true if the field is marked in the presence mask
 8270inline bool fasttest::Value36_PresentQ(fasttest::MsgPmap& parent) {
 8271    return pmask_qGetBit(parent, 29);
 8272}
 8273
 8274// --- fasttest.MsgPmap.Value36.SetPresent
 8275// Set presence bit for this field in the pmask
 8276inline void fasttest::Value36_SetPresent(fasttest::MsgPmap& parent) {
 8277    pmask_qSetBit(parent, 29); // mark presence in pmask
 8278}
 8279
 8280// --- fasttest.MsgPmap.Value36.Present_GetBit
 8281// Return field's bit number in the pmask
 8282inline int fasttest::Value36_Present_GetBit(fasttest::MsgPmap& parent) {
 8283    int retval = 29;
 8284    (void)parent;//only to avoid -Wunused-parameter
 8285    return retval;
 8286}
 8287
 8288// --- fasttest.MsgPmap.Value36.Get
 8289inline u32 fasttest::Value36_Get(fasttest::MsgPmap& parent) {
 8290    (void)parent;
 8291    return u32(1);
 8292}
 8293
 8294// --- fasttest.MsgPmap.Value37.PresentQ
 8295// Return true if the field is marked in the presence mask
 8296inline bool fasttest::Value37_PresentQ(fasttest::MsgPmap& parent) {
 8297    return pmask_qGetBit(parent, 30);
 8298}
 8299
 8300// --- fasttest.MsgPmap.Value37.SetPresent
 8301// Set presence bit for this field in the pmask
 8302inline void fasttest::Value37_SetPresent(fasttest::MsgPmap& parent) {
 8303    pmask_qSetBit(parent, 30); // mark presence in pmask
 8304}
 8305
 8306// --- fasttest.MsgPmap.Value37.Present_GetBit
 8307// Return field's bit number in the pmask
 8308inline int fasttest::Value37_Present_GetBit(fasttest::MsgPmap& parent) {
 8309    int retval = 30;
 8310    (void)parent;//only to avoid -Wunused-parameter
 8311    return retval;
 8312}
 8313
 8314// --- fasttest.MsgPmap.Value37.Get
 8315inline u32 fasttest::Value37_Get(fasttest::MsgPmap& parent) {
 8316    (void)parent;
 8317    return u32(1);
 8318}
 8319
 8320// --- fasttest.MsgPmap.Value38.PresentQ
 8321// Return true if the field is marked in the presence mask
 8322inline bool fasttest::Value38_PresentQ(fasttest::MsgPmap& parent) {
 8323    return pmask_qGetBit(parent, 31);
 8324}
 8325
 8326// --- fasttest.MsgPmap.Value38.SetPresent
 8327// Set presence bit for this field in the pmask
 8328inline void fasttest::Value38_SetPresent(fasttest::MsgPmap& parent) {
 8329    pmask_qSetBit(parent, 31); // mark presence in pmask
 8330}
 8331
 8332// --- fasttest.MsgPmap.Value38.Present_GetBit
 8333// Return field's bit number in the pmask
 8334inline int fasttest::Value38_Present_GetBit(fasttest::MsgPmap& parent) {
 8335    int retval = 31;
 8336    (void)parent;//only to avoid -Wunused-parameter
 8337    return retval;
 8338}
 8339
 8340// --- fasttest.MsgPmap.Value38.Get
 8341inline u32 fasttest::Value38_Get(fasttest::MsgPmap& parent) {
 8342    (void)parent;
 8343    return u32(1);
 8344}
 8345
 8346// --- fasttest.MsgPmap.Value39.PresentQ
 8347// Return true if the field is marked in the presence mask
 8348inline bool fasttest::Value39_PresentQ(fasttest::MsgPmap& parent) {
 8349    return pmask_qGetBit(parent, 32);
 8350}
 8351
 8352// --- fasttest.MsgPmap.Value39.SetPresent
 8353// Set presence bit for this field in the pmask
 8354inline void fasttest::Value39_SetPresent(fasttest::MsgPmap& parent) {
 8355    pmask_qSetBit(parent, 32); // mark presence in pmask
 8356}
 8357
 8358// --- fasttest.MsgPmap.Value39.Present_GetBit
 8359// Return field's bit number in the pmask
 8360inline int fasttest::Value39_Present_GetBit(fasttest::MsgPmap& parent) {
 8361    int retval = 32;
 8362    (void)parent;//only to avoid -Wunused-parameter
 8363    return retval;
 8364}
 8365
 8366// --- fasttest.MsgPmap.Value39.Get
 8367inline u32 fasttest::Value39_Get(fasttest::MsgPmap& parent) {
 8368    (void)parent;
 8369    return u32(1);
 8370}
 8371
 8372// --- fasttest.MsgPmap.Value40.PresentQ
 8373// Return true if the field is marked in the presence mask
 8374inline bool fasttest::Value40_PresentQ(fasttest::MsgPmap& parent) {
 8375    return pmask_qGetBit(parent, 34);
 8376}
 8377
 8378// --- fasttest.MsgPmap.Value40.SetPresent
 8379// Set presence bit for this field in the pmask
 8380inline void fasttest::Value40_SetPresent(fasttest::MsgPmap& parent) {
 8381    pmask_qSetBit(parent, 34); // mark presence in pmask
 8382}
 8383
 8384// --- fasttest.MsgPmap.Value40.Present_GetBit
 8385// Return field's bit number in the pmask
 8386inline int fasttest::Value40_Present_GetBit(fasttest::MsgPmap& parent) {
 8387    int retval = 34;
 8388    (void)parent;//only to avoid -Wunused-parameter
 8389    return retval;
 8390}
 8391
 8392// --- fasttest.MsgPmap.Value40.Get
 8393inline u32 fasttest::Value40_Get(fasttest::MsgPmap& parent) {
 8394    (void)parent;
 8395    return u32(1);
 8396}
 8397
 8398// --- fasttest.MsgPmap.Value41.PresentQ
 8399// Return true if the field is marked in the presence mask
 8400inline bool fasttest::Value41_PresentQ(fasttest::MsgPmap& parent) {
 8401    return pmask_qGetBit(parent, 35);
 8402}
 8403
 8404// --- fasttest.MsgPmap.Value41.SetPresent
 8405// Set presence bit for this field in the pmask
 8406inline void fasttest::Value41_SetPresent(fasttest::MsgPmap& parent) {
 8407    pmask_qSetBit(parent, 35); // mark presence in pmask
 8408}
 8409
 8410// --- fasttest.MsgPmap.Value41.Present_GetBit
 8411// Return field's bit number in the pmask
 8412inline int fasttest::Value41_Present_GetBit(fasttest::MsgPmap& parent) {
 8413    int retval = 35;
 8414    (void)parent;//only to avoid -Wunused-parameter
 8415    return retval;
 8416}
 8417
 8418// --- fasttest.MsgPmap.Value41.Get
 8419inline u32 fasttest::Value41_Get(fasttest::MsgPmap& parent) {
 8420    (void)parent;
 8421    return u32(1);
 8422}
 8423
 8424// --- fasttest.MsgPmap.Value42.PresentQ
 8425// Return true if the field is marked in the presence mask
 8426inline bool fasttest::Value42_PresentQ(fasttest::MsgPmap& parent) {
 8427    return pmask_qGetBit(parent, 36);
 8428}
 8429
 8430// --- fasttest.MsgPmap.Value42.SetPresent
 8431// Set presence bit for this field in the pmask
 8432inline void fasttest::Value42_SetPresent(fasttest::MsgPmap& parent) {
 8433    pmask_qSetBit(parent, 36); // mark presence in pmask
 8434}
 8435
 8436// --- fasttest.MsgPmap.Value42.Present_GetBit
 8437// Return field's bit number in the pmask
 8438inline int fasttest::Value42_Present_GetBit(fasttest::MsgPmap& parent) {
 8439    int retval = 36;
 8440    (void)parent;//only to avoid -Wunused-parameter
 8441    return retval;
 8442}
 8443
 8444// --- fasttest.MsgPmap.Value42.Get
 8445inline u32 fasttest::Value42_Get(fasttest::MsgPmap& parent) {
 8446    (void)parent;
 8447    return u32(1);
 8448}
 8449
 8450// --- fasttest.MsgPmap.Value43.PresentQ
 8451// Return true if the field is marked in the presence mask
 8452inline bool fasttest::Value43_PresentQ(fasttest::MsgPmap& parent) {
 8453    return pmask_qGetBit(parent, 37);
 8454}
 8455
 8456// --- fasttest.MsgPmap.Value43.SetPresent
 8457// Set presence bit for this field in the pmask
 8458inline void fasttest::Value43_SetPresent(fasttest::MsgPmap& parent) {
 8459    pmask_qSetBit(parent, 37); // mark presence in pmask
 8460}
 8461
 8462// --- fasttest.MsgPmap.Value43.Present_GetBit
 8463// Return field's bit number in the pmask
 8464inline int fasttest::Value43_Present_GetBit(fasttest::MsgPmap& parent) {
 8465    int retval = 37;
 8466    (void)parent;//only to avoid -Wunused-parameter
 8467    return retval;
 8468}
 8469
 8470// --- fasttest.MsgPmap.Value43.Get
 8471inline u32 fasttest::Value43_Get(fasttest::MsgPmap& parent) {
 8472    (void)parent;
 8473    return u32(1);
 8474}
 8475
 8476// --- fasttest.MsgPmap.Value44.PresentQ
 8477// Return true if the field is marked in the presence mask
 8478inline bool fasttest::Value44_PresentQ(fasttest::MsgPmap& parent) {
 8479    return pmask_qGetBit(parent, 38);
 8480}
 8481
 8482// --- fasttest.MsgPmap.Value44.SetPresent
 8483// Set presence bit for this field in the pmask
 8484inline void fasttest::Value44_SetPresent(fasttest::MsgPmap& parent) {
 8485    pmask_qSetBit(parent, 38); // mark presence in pmask
 8486}
 8487
 8488// --- fasttest.MsgPmap.Value44.Present_GetBit
 8489// Return field's bit number in the pmask
 8490inline int fasttest::Value44_Present_GetBit(fasttest::MsgPmap& parent) {
 8491    int retval = 38;
 8492    (void)parent;//only to avoid -Wunused-parameter
 8493    return retval;
 8494}
 8495
 8496// --- fasttest.MsgPmap.Value44.Get
 8497inline u32 fasttest::Value44_Get(fasttest::MsgPmap& parent) {
 8498    (void)parent;
 8499    return u32(1);
 8500}
 8501
 8502// --- fasttest.MsgPmap.Value45.PresentQ
 8503// Return true if the field is marked in the presence mask
 8504inline bool fasttest::Value45_PresentQ(fasttest::MsgPmap& parent) {
 8505    return pmask_qGetBit(parent, 39);
 8506}
 8507
 8508// --- fasttest.MsgPmap.Value45.SetPresent
 8509// Set presence bit for this field in the pmask
 8510inline void fasttest::Value45_SetPresent(fasttest::MsgPmap& parent) {
 8511    pmask_qSetBit(parent, 39); // mark presence in pmask
 8512}
 8513
 8514// --- fasttest.MsgPmap.Value45.Present_GetBit
 8515// Return field's bit number in the pmask
 8516inline int fasttest::Value45_Present_GetBit(fasttest::MsgPmap& parent) {
 8517    int retval = 39;
 8518    (void)parent;//only to avoid -Wunused-parameter
 8519    return retval;
 8520}
 8521
 8522// --- fasttest.MsgPmap.Value45.Get
 8523inline u32 fasttest::Value45_Get(fasttest::MsgPmap& parent) {
 8524    (void)parent;
 8525    return u32(1);
 8526}
 8527
 8528// --- fasttest.MsgPmap.Value46.PresentQ
 8529// Return true if the field is marked in the presence mask
 8530inline bool fasttest::Value46_PresentQ(fasttest::MsgPmap& parent) {
 8531    return pmask_qGetBit(parent, 40);
 8532}
 8533
 8534// --- fasttest.MsgPmap.Value46.SetPresent
 8535// Set presence bit for this field in the pmask
 8536inline void fasttest::Value46_SetPresent(fasttest::MsgPmap& parent) {
 8537    pmask_qSetBit(parent, 40); // mark presence in pmask
 8538}
 8539
 8540// --- fasttest.MsgPmap.Value46.Present_GetBit
 8541// Return field's bit number in the pmask
 8542inline int fasttest::Value46_Present_GetBit(fasttest::MsgPmap& parent) {
 8543    int retval = 40;
 8544    (void)parent;//only to avoid -Wunused-parameter
 8545    return retval;
 8546}
 8547
 8548// --- fasttest.MsgPmap.Value46.Get
 8549inline u32 fasttest::Value46_Get(fasttest::MsgPmap& parent) {
 8550    (void)parent;
 8551    return u32(1);
 8552}
 8553
 8554// --- fasttest.MsgPmap.Value47.PresentQ
 8555// Return true if the field is marked in the presence mask
 8556inline bool fasttest::Value47_PresentQ(fasttest::MsgPmap& parent) {
 8557    return pmask_qGetBit(parent, 41);
 8558}
 8559
 8560// --- fasttest.MsgPmap.Value47.SetPresent
 8561// Set presence bit for this field in the pmask
 8562inline void fasttest::Value47_SetPresent(fasttest::MsgPmap& parent) {
 8563    pmask_qSetBit(parent, 41); // mark presence in pmask
 8564}
 8565
 8566// --- fasttest.MsgPmap.Value47.Present_GetBit
 8567// Return field's bit number in the pmask
 8568inline int fasttest::Value47_Present_GetBit(fasttest::MsgPmap& parent) {
 8569    int retval = 41;
 8570    (void)parent;//only to avoid -Wunused-parameter
 8571    return retval;
 8572}
 8573
 8574// --- fasttest.MsgPmap.Value47.Get
 8575inline u32 fasttest::Value47_Get(fasttest::MsgPmap& parent) {
 8576    (void)parent;
 8577    return u32(1);
 8578}
 8579
 8580// --- fasttest.MsgPmap.Value48.PresentQ
 8581// Return true if the field is marked in the presence mask
 8582inline bool fasttest::Value48_PresentQ(fasttest::MsgPmap& parent) {
 8583    return pmask_qGetBit(parent, 42);
 8584}
 8585
 8586// --- fasttest.MsgPmap.Value48.SetPresent
 8587// Set presence bit for this field in the pmask
 8588inline void fasttest::Value48_SetPresent(fasttest::MsgPmap& parent) {
 8589    pmask_qSetBit(parent, 42); // mark presence in pmask
 8590}
 8591
 8592// --- fasttest.MsgPmap.Value48.Present_GetBit
 8593// Return field's bit number in the pmask
 8594inline int fasttest::Value48_Present_GetBit(fasttest::MsgPmap& parent) {
 8595    int retval = 42;
 8596    (void)parent;//only to avoid -Wunused-parameter
 8597    return retval;
 8598}
 8599
 8600// --- fasttest.MsgPmap.Value48.Get
 8601inline u32 fasttest::Value48_Get(fasttest::MsgPmap& parent) {
 8602    (void)parent;
 8603    return u32(1);
 8604}
 8605
 8606// --- fasttest.MsgPmap.Value49.PresentQ
 8607// Return true if the field is marked in the presence mask
 8608inline bool fasttest::Value49_PresentQ(fasttest::MsgPmap& parent) {
 8609    return pmask_qGetBit(parent, 43);
 8610}
 8611
 8612// --- fasttest.MsgPmap.Value49.SetPresent
 8613// Set presence bit for this field in the pmask
 8614inline void fasttest::Value49_SetPresent(fasttest::MsgPmap& parent) {
 8615    pmask_qSetBit(parent, 43); // mark presence in pmask
 8616}
 8617
 8618// --- fasttest.MsgPmap.Value49.Present_GetBit
 8619// Return field's bit number in the pmask
 8620inline int fasttest::Value49_Present_GetBit(fasttest::MsgPmap& parent) {
 8621    int retval = 43;
 8622    (void)parent;//only to avoid -Wunused-parameter
 8623    return retval;
 8624}
 8625
 8626// --- fasttest.MsgPmap.Value49.Get
 8627inline u32 fasttest::Value49_Get(fasttest::MsgPmap& parent) {
 8628    (void)parent;
 8629    return u32(1);
 8630}
 8631
 8632// --- fasttest.MsgPmap.Value50.PresentQ
 8633// Return true if the field is marked in the presence mask
 8634inline bool fasttest::Value50_PresentQ(fasttest::MsgPmap& parent) {
 8635    return pmask_qGetBit(parent, 45);
 8636}
 8637
 8638// --- fasttest.MsgPmap.Value50.SetPresent
 8639// Set presence bit for this field in the pmask
 8640inline void fasttest::Value50_SetPresent(fasttest::MsgPmap& parent) {
 8641    pmask_qSetBit(parent, 45); // mark presence in pmask
 8642}
 8643
 8644// --- fasttest.MsgPmap.Value50.Present_GetBit
 8645// Return field's bit number in the pmask
 8646inline int fasttest::Value50_Present_GetBit(fasttest::MsgPmap& parent) {
 8647    int retval = 45;
 8648    (void)parent;//only to avoid -Wunused-parameter
 8649    return retval;
 8650}
 8651
 8652// --- fasttest.MsgPmap.Value50.Get
 8653inline u32 fasttest::Value50_Get(fasttest::MsgPmap& parent) {
 8654    (void)parent;
 8655    return u32(1);
 8656}
 8657
 8658// --- fasttest.MsgPmap.Value51.PresentQ
 8659// Return true if the field is marked in the presence mask
 8660inline bool fasttest::Value51_PresentQ(fasttest::MsgPmap& parent) {
 8661    return pmask_qGetBit(parent, 46);
 8662}
 8663
 8664// --- fasttest.MsgPmap.Value51.SetPresent
 8665// Set presence bit for this field in the pmask
 8666inline void fasttest::Value51_SetPresent(fasttest::MsgPmap& parent) {
 8667    pmask_qSetBit(parent, 46); // mark presence in pmask
 8668}
 8669
 8670// --- fasttest.MsgPmap.Value51.Present_GetBit
 8671// Return field's bit number in the pmask
 8672inline int fasttest::Value51_Present_GetBit(fasttest::MsgPmap& parent) {
 8673    int retval = 46;
 8674    (void)parent;//only to avoid -Wunused-parameter
 8675    return retval;
 8676}
 8677
 8678// --- fasttest.MsgPmap.Value51.Get
 8679inline u32 fasttest::Value51_Get(fasttest::MsgPmap& parent) {
 8680    (void)parent;
 8681    return u32(1);
 8682}
 8683
 8684// --- fasttest.MsgPmap.Value52.PresentQ
 8685// Return true if the field is marked in the presence mask
 8686inline bool fasttest::Value52_PresentQ(fasttest::MsgPmap& parent) {
 8687    return pmask_qGetBit(parent, 47);
 8688}
 8689
 8690// --- fasttest.MsgPmap.Value52.SetPresent
 8691// Set presence bit for this field in the pmask
 8692inline void fasttest::Value52_SetPresent(fasttest::MsgPmap& parent) {
 8693    pmask_qSetBit(parent, 47); // mark presence in pmask
 8694}
 8695
 8696// --- fasttest.MsgPmap.Value52.Present_GetBit
 8697// Return field's bit number in the pmask
 8698inline int fasttest::Value52_Present_GetBit(fasttest::MsgPmap& parent) {
 8699    int retval = 47;
 8700    (void)parent;//only to avoid -Wunused-parameter
 8701    return retval;
 8702}
 8703
 8704// --- fasttest.MsgPmap.Value52.Get
 8705inline u32 fasttest::Value52_Get(fasttest::MsgPmap& parent) {
 8706    (void)parent;
 8707    return u32(1);
 8708}
 8709
 8710// --- fasttest.MsgPmap.Value53.PresentQ
 8711// Return true if the field is marked in the presence mask
 8712inline bool fasttest::Value53_PresentQ(fasttest::MsgPmap& parent) {
 8713    return pmask_qGetBit(parent, 48);
 8714}
 8715
 8716// --- fasttest.MsgPmap.Value53.SetPresent
 8717// Set presence bit for this field in the pmask
 8718inline void fasttest::Value53_SetPresent(fasttest::MsgPmap& parent) {
 8719    pmask_qSetBit(parent, 48); // mark presence in pmask
 8720}
 8721
 8722// --- fasttest.MsgPmap.Value53.Present_GetBit
 8723// Return field's bit number in the pmask
 8724inline int fasttest::Value53_Present_GetBit(fasttest::MsgPmap& parent) {
 8725    int retval = 48;
 8726    (void)parent;//only to avoid -Wunused-parameter
 8727    return retval;
 8728}
 8729
 8730// --- fasttest.MsgPmap.Value53.Get
 8731inline u32 fasttest::Value53_Get(fasttest::MsgPmap& parent) {
 8732    (void)parent;
 8733    return u32(1);
 8734}
 8735
 8736// --- fasttest.MsgPmap.Value54.PresentQ
 8737// Return true if the field is marked in the presence mask
 8738inline bool fasttest::Value54_PresentQ(fasttest::MsgPmap& parent) {
 8739    return pmask_qGetBit(parent, 49);
 8740}
 8741
 8742// --- fasttest.MsgPmap.Value54.SetPresent
 8743// Set presence bit for this field in the pmask
 8744inline void fasttest::Value54_SetPresent(fasttest::MsgPmap& parent) {
 8745    pmask_qSetBit(parent, 49); // mark presence in pmask
 8746}
 8747
 8748// --- fasttest.MsgPmap.Value54.Present_GetBit
 8749// Return field's bit number in the pmask
 8750inline int fasttest::Value54_Present_GetBit(fasttest::MsgPmap& parent) {
 8751    int retval = 49;
 8752    (void)parent;//only to avoid -Wunused-parameter
 8753    return retval;
 8754}
 8755
 8756// --- fasttest.MsgPmap.Value54.Get
 8757inline u32 fasttest::Value54_Get(fasttest::MsgPmap& parent) {
 8758    (void)parent;
 8759    return u32(1);
 8760}
 8761
 8762// --- fasttest.MsgPmap.Value55.PresentQ
 8763// Return true if the field is marked in the presence mask
 8764inline bool fasttest::Value55_PresentQ(fasttest::MsgPmap& parent) {
 8765    return pmask_qGetBit(parent, 50);
 8766}
 8767
 8768// --- fasttest.MsgPmap.Value55.SetPresent
 8769// Set presence bit for this field in the pmask
 8770inline void fasttest::Value55_SetPresent(fasttest::MsgPmap& parent) {
 8771    pmask_qSetBit(parent, 50); // mark presence in pmask
 8772}
 8773
 8774// --- fasttest.MsgPmap.Value55.Present_GetBit
 8775// Return field's bit number in the pmask
 8776inline int fasttest::Value55_Present_GetBit(fasttest::MsgPmap& parent) {
 8777    int retval = 50;
 8778    (void)parent;//only to avoid -Wunused-parameter
 8779    return retval;
 8780}
 8781
 8782// --- fasttest.MsgPmap.Value55.Get
 8783inline u32 fasttest::Value55_Get(fasttest::MsgPmap& parent) {
 8784    (void)parent;
 8785    return u32(1);
 8786}
 8787
 8788// --- fasttest.MsgPmap.Value56.PresentQ
 8789// Return true if the field is marked in the presence mask
 8790inline bool fasttest::Value56_PresentQ(fasttest::MsgPmap& parent) {
 8791    return pmask_qGetBit(parent, 51);
 8792}
 8793
 8794// --- fasttest.MsgPmap.Value56.SetPresent
 8795// Set presence bit for this field in the pmask
 8796inline void fasttest::Value56_SetPresent(fasttest::MsgPmap& parent) {
 8797    pmask_qSetBit(parent, 51); // mark presence in pmask
 8798}
 8799
 8800// --- fasttest.MsgPmap.Value56.Present_GetBit
 8801// Return field's bit number in the pmask
 8802inline int fasttest::Value56_Present_GetBit(fasttest::MsgPmap& parent) {
 8803    int retval = 51;
 8804    (void)parent;//only to avoid -Wunused-parameter
 8805    return retval;
 8806}
 8807
 8808// --- fasttest.MsgPmap.Value56.Get
 8809inline u32 fasttest::Value56_Get(fasttest::MsgPmap& parent) {
 8810    (void)parent;
 8811    return u32(1);
 8812}
 8813
 8814// --- fasttest.MsgPmap.Value57.PresentQ
 8815// Return true if the field is marked in the presence mask
 8816inline bool fasttest::Value57_PresentQ(fasttest::MsgPmap& parent) {
 8817    return pmask_qGetBit(parent, 52);
 8818}
 8819
 8820// --- fasttest.MsgPmap.Value57.SetPresent
 8821// Set presence bit for this field in the pmask
 8822inline void fasttest::Value57_SetPresent(fasttest::MsgPmap& parent) {
 8823    pmask_qSetBit(parent, 52); // mark presence in pmask
 8824}
 8825
 8826// --- fasttest.MsgPmap.Value57.Present_GetBit
 8827// Return field's bit number in the pmask
 8828inline int fasttest::Value57_Present_GetBit(fasttest::MsgPmap& parent) {
 8829    int retval = 52;
 8830    (void)parent;//only to avoid -Wunused-parameter
 8831    return retval;
 8832}
 8833
 8834// --- fasttest.MsgPmap.Value57.Get
 8835inline u32 fasttest::Value57_Get(fasttest::MsgPmap& parent) {
 8836    (void)parent;
 8837    return u32(1);
 8838}
 8839
 8840// --- fasttest.MsgPmap.Value58.PresentQ
 8841// Return true if the field is marked in the presence mask
 8842inline bool fasttest::Value58_PresentQ(fasttest::MsgPmap& parent) {
 8843    return pmask_qGetBit(parent, 53);
 8844}
 8845
 8846// --- fasttest.MsgPmap.Value58.SetPresent
 8847// Set presence bit for this field in the pmask
 8848inline void fasttest::Value58_SetPresent(fasttest::MsgPmap& parent) {
 8849    pmask_qSetBit(parent, 53); // mark presence in pmask
 8850}
 8851
 8852// --- fasttest.MsgPmap.Value58.Present_GetBit
 8853// Return field's bit number in the pmask
 8854inline int fasttest::Value58_Present_GetBit(fasttest::MsgPmap& parent) {
 8855    int retval = 53;
 8856    (void)parent;//only to avoid -Wunused-parameter
 8857    return retval;
 8858}
 8859
 8860// --- fasttest.MsgPmap.Value58.Get
 8861inline u32 fasttest::Value58_Get(fasttest::MsgPmap& parent) {
 8862    (void)parent;
 8863    return u32(1);
 8864}
 8865
 8866// --- fasttest.MsgPmap.Value59.PresentQ
 8867// Return true if the field is marked in the presence mask
 8868inline bool fasttest::Value59_PresentQ(fasttest::MsgPmap& parent) {
 8869    return pmask_qGetBit(parent, 54);
 8870}
 8871
 8872// --- fasttest.MsgPmap.Value59.SetPresent
 8873// Set presence bit for this field in the pmask
 8874inline void fasttest::Value59_SetPresent(fasttest::MsgPmap& parent) {
 8875    pmask_qSetBit(parent, 54); // mark presence in pmask
 8876}
 8877
 8878// --- fasttest.MsgPmap.Value59.Present_GetBit
 8879// Return field's bit number in the pmask
 8880inline int fasttest::Value59_Present_GetBit(fasttest::MsgPmap& parent) {
 8881    int retval = 54;
 8882    (void)parent;//only to avoid -Wunused-parameter
 8883    return retval;
 8884}
 8885
 8886// --- fasttest.MsgPmap.Value59.Get
 8887inline u32 fasttest::Value59_Get(fasttest::MsgPmap& parent) {
 8888    (void)parent;
 8889    return u32(1);
 8890}
 8891
 8892// --- fasttest.MsgPmap.Value60.PresentQ
 8893// Return true if the field is marked in the presence mask
 8894inline bool fasttest::Value60_PresentQ(fasttest::MsgPmap& parent) {
 8895    return pmask_qGetBit(parent, 56);
 8896}
 8897
 8898// --- fasttest.MsgPmap.Value60.SetPresent
 8899// Set presence bit for this field in the pmask
 8900inline void fasttest::Value60_SetPresent(fasttest::MsgPmap& parent) {
 8901    pmask_qSetBit(parent, 56); // mark presence in pmask
 8902}
 8903
 8904// --- fasttest.MsgPmap.Value60.Present_GetBit
 8905// Return field's bit number in the pmask
 8906inline int fasttest::Value60_Present_GetBit(fasttest::MsgPmap& parent) {
 8907    int retval = 56;
 8908    (void)parent;//only to avoid -Wunused-parameter
 8909    return retval;
 8910}
 8911
 8912// --- fasttest.MsgPmap.Value60.Get
 8913inline u32 fasttest::Value60_Get(fasttest::MsgPmap& parent) {
 8914    (void)parent;
 8915    return u32(1);
 8916}
 8917
 8918// --- fasttest.MsgPmap.Value61.PresentQ
 8919// Return true if the field is marked in the presence mask
 8920inline bool fasttest::Value61_PresentQ(fasttest::MsgPmap& parent) {
 8921    return pmask_qGetBit(parent, 57);
 8922}
 8923
 8924// --- fasttest.MsgPmap.Value61.SetPresent
 8925// Set presence bit for this field in the pmask
 8926inline void fasttest::Value61_SetPresent(fasttest::MsgPmap& parent) {
 8927    pmask_qSetBit(parent, 57); // mark presence in pmask
 8928}
 8929
 8930// --- fasttest.MsgPmap.Value61.Present_GetBit
 8931// Return field's bit number in the pmask
 8932inline int fasttest::Value61_Present_GetBit(fasttest::MsgPmap& parent) {
 8933    int retval = 57;
 8934    (void)parent;//only to avoid -Wunused-parameter
 8935    return retval;
 8936}
 8937
 8938// --- fasttest.MsgPmap.Value61.Get
 8939inline u32 fasttest::Value61_Get(fasttest::MsgPmap& parent) {
 8940    (void)parent;
 8941    return u32(1);
 8942}
 8943
 8944// --- fasttest.MsgPmap.Value62.PresentQ
 8945// Return true if the field is marked in the presence mask
 8946inline bool fasttest::Value62_PresentQ(fasttest::MsgPmap& parent) {
 8947    return pmask_qGetBit(parent, 58);
 8948}
 8949
 8950// --- fasttest.MsgPmap.Value62.SetPresent
 8951// Set presence bit for this field in the pmask
 8952inline void fasttest::Value62_SetPresent(fasttest::MsgPmap& parent) {
 8953    pmask_qSetBit(parent, 58); // mark presence in pmask
 8954}
 8955
 8956// --- fasttest.MsgPmap.Value62.Present_GetBit
 8957// Return field's bit number in the pmask
 8958inline int fasttest::Value62_Present_GetBit(fasttest::MsgPmap& parent) {
 8959    int retval = 58;
 8960    (void)parent;//only to avoid -Wunused-parameter
 8961    return retval;
 8962}
 8963
 8964// --- fasttest.MsgPmap.Value62.Get
 8965inline u32 fasttest::Value62_Get(fasttest::MsgPmap& parent) {
 8966    (void)parent;
 8967    return u32(1);
 8968}
 8969
 8970// --- fasttest.MsgPmap.Value63.PresentQ
 8971// Return true if the field is marked in the presence mask
 8972inline bool fasttest::Value63_PresentQ(fasttest::MsgPmap& parent) {
 8973    return pmask_qGetBit(parent, 59);
 8974}
 8975
 8976// --- fasttest.MsgPmap.Value63.SetPresent
 8977// Set presence bit for this field in the pmask
 8978inline void fasttest::Value63_SetPresent(fasttest::MsgPmap& parent) {
 8979    pmask_qSetBit(parent, 59); // mark presence in pmask
 8980}
 8981
 8982// --- fasttest.MsgPmap.Value63.Present_GetBit
 8983// Return field's bit number in the pmask
 8984inline int fasttest::Value63_Present_GetBit(fasttest::MsgPmap& parent) {
 8985    int retval = 59;
 8986    (void)parent;//only to avoid -Wunused-parameter
 8987    return retval;
 8988}
 8989
 8990// --- fasttest.MsgPmap.Value63.Get
 8991inline u32 fasttest::Value63_Get(fasttest::MsgPmap& parent) {
 8992    (void)parent;
 8993    return u32(1);
 8994}
 8995
 8996// --- fasttest.MsgPmap.pmask_bitcurs.Reset
 8997inline void fasttest::MsgPmap_pmask_bitcurs_Reset(MsgPmap_pmask_bitcurs &curs, fasttest::MsgPmap &parent) {
 8998    curs.elems = &pmask_qFind(parent,0);
 8999    curs.n_elems = pmask_N(parent);
 9000    curs.bit = -1;
 9001    MsgPmap_pmask_bitcurs_Next(curs);
 9002}
 9003
 9004// --- fasttest.MsgPmap.pmask_bitcurs.ValidQ
 9005// cursor points to valid item
 9006inline bool fasttest::MsgPmap_pmask_bitcurs_ValidQ(MsgPmap_pmask_bitcurs &curs) {
 9007    return curs.bit < curs.n_elems*64;
 9008}
 9009
 9010// --- fasttest.MsgPmap.pmask_bitcurs.Access
 9011// item access
 9012inline int& fasttest::MsgPmap_pmask_bitcurs_Access(MsgPmap_pmask_bitcurs &curs) {
 9013    return curs.bit;
 9014}
 9015
 9016// --- fasttest.MsgPmap..GetMsgLength
 9017// Message length (uses length field)
 9018inline i32 fasttest::GetMsgLength(const fasttest::MsgPmap& parent) {
 9019    return i32(const_cast<fasttest::MsgPmap&>(parent).length);
 9020}
 9021
 9022// --- fasttest.MsgPmap..GetMsgMemptr
 9023// Memptr encompassing the message (uses length field)
 9024inline algo::memptr fasttest::GetMsgMemptr(const fasttest::MsgPmap& row) {
 9025    return algo::memptr((u8*)&row, i32(const_cast<fasttest::MsgPmap&>(row).length));
 9026}
 9027inline fasttest::OptSgmSeq::OptSgmSeq() {
 9028    fasttest::OptSgmSeq_Init(*this);
 9029}
 9030
 9031
 9032// --- fasttest.OptSgmSeq..Init
 9033// Set all fields to initial values.
 9034inline void fasttest::OptSgmSeq_Init(fasttest::OptSgmSeq& OptSgmSeq) {
 9035    OptSgmSeq.Value = u32(1);
 9036}
 9037inline fasttest::OptTrvSeq::OptTrvSeq() {
 9038    fasttest::OptTrvSeq_Init(*this);
 9039}
 9040
 9041
 9042// --- fasttest.OptTrvSeq..Init
 9043// Set all fields to initial values.
 9044inline void fasttest::OptTrvSeq_Init(fasttest::OptTrvSeq& OptTrvSeq) {
 9045    OptTrvSeq.Value = u32(0);
 9046}
 9047inline fasttest::Reset::Reset() {
 9048    fasttest::Reset_Init(*this);
 9049}
 9050
 9051
 9052// --- fasttest.Reset.base.Castdown
 9053// Check if fasttest::TemplateHeader is an instance of Reset by checking the type field
 9054// If it is, return the pointer of target type.
 9055// Additionally, check if the length field permits valid instance of Reset.
 9056// If not successful, quietly return NULL.
 9057inline fasttest::Reset* fasttest::Reset_Castdown(fasttest::TemplateHeader &hdr) {
 9058    bool cond = hdr.id == (120);
 9059    cond &= i32(hdr.length) >= ssizeof(fasttest::Reset);
 9060    return cond ? reinterpret_cast<fasttest::Reset*>(&hdr) : NULL;
 9061}
 9062
 9063// --- fasttest.Reset.base.Castbase
 9064inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::Reset& parent) {
 9065    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9066}
 9067
 9068// --- fasttest.Reset..GetMsgLength
 9069// Message length (uses length field)
 9070inline i32 fasttest::GetMsgLength(const fasttest::Reset& parent) {
 9071    return i32(const_cast<fasttest::Reset&>(parent).length);
 9072}
 9073
 9074// --- fasttest.Reset..GetMsgMemptr
 9075// Memptr encompassing the message (uses length field)
 9076inline algo::memptr fasttest::GetMsgMemptr(const fasttest::Reset& row) {
 9077    return algo::memptr((u8*)&row, i32(const_cast<fasttest::Reset&>(row).length));
 9078}
 9079
 9080// --- fasttest.Reset..Init
 9081// Set all fields to initial values.
 9082inline void fasttest::Reset_Init(fasttest::Reset& parent) {
 9083    parent.length = u32(ssizeof(parent) + (0));
 9084    parent.id = u32(120);
 9085}
 9086inline fasttest::SampleEnumConst::SampleEnumConst() {
 9087    fasttest::SampleEnumConst_Init(*this);
 9088}
 9089
 9090
 9091// --- fasttest.SampleEnumConst.base.Castdown
 9092// Check if fasttest::TemplateHeader is an instance of SampleEnumConst by checking the type field
 9093// If it is, return the pointer of target type.
 9094// Additionally, check if the length field permits valid instance of SampleEnumConst.
 9095// If not successful, quietly return NULL.
 9096inline fasttest::SampleEnumConst* fasttest::SampleEnumConst_Castdown(fasttest::TemplateHeader &hdr) {
 9097    bool cond = hdr.id == (145);
 9098    cond &= i32(hdr.length) >= ssizeof(fasttest::SampleEnumConst);
 9099    return cond ? reinterpret_cast<fasttest::SampleEnumConst*>(&hdr) : NULL;
 9100}
 9101
 9102// --- fasttest.SampleEnumConst.base.Castbase
 9103inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SampleEnumConst& parent) {
 9104    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9105}
 9106
 9107// --- fasttest.SampleEnumConst.Value.Get
 9108inline fasttest::SampleEnum fasttest::Value_Get(fasttest::SampleEnumConst& parent) {
 9109    (void)parent;
 9110    return fasttest::SampleEnum(1);
 9111}
 9112
 9113// --- fasttest.SampleEnumConst..GetMsgLength
 9114// Message length (uses length field)
 9115inline i32 fasttest::GetMsgLength(const fasttest::SampleEnumConst& parent) {
 9116    return i32(const_cast<fasttest::SampleEnumConst&>(parent).length);
 9117}
 9118
 9119// --- fasttest.SampleEnumConst..GetMsgMemptr
 9120// Memptr encompassing the message (uses length field)
 9121inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SampleEnumConst& row) {
 9122    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SampleEnumConst&>(row).length));
 9123}
 9124
 9125// --- fasttest.SampleEnumConst..Init
 9126// Set all fields to initial values.
 9127inline void fasttest::SampleEnumConst_Init(fasttest::SampleEnumConst& parent) {
 9128    parent.length = u32(ssizeof(parent) + (0));
 9129    parent.id = u32(145);
 9130}
 9131inline fasttest::SampleEnumCopy::SampleEnumCopy() {
 9132    fasttest::SampleEnumCopy_Init(*this);
 9133}
 9134
 9135
 9136// --- fasttest.SampleEnumCopy.base.Castdown
 9137// Check if fasttest::TemplateHeader is an instance of SampleEnumCopy by checking the type field
 9138// If it is, return the pointer of target type.
 9139// Additionally, check if the length field permits valid instance of SampleEnumCopy.
 9140// If not successful, quietly return NULL.
 9141inline fasttest::SampleEnumCopy* fasttest::SampleEnumCopy_Castdown(fasttest::TemplateHeader &hdr) {
 9142    bool cond = hdr.id == (147);
 9143    cond &= i32(hdr.length) >= ssizeof(fasttest::SampleEnumCopy);
 9144    return cond ? reinterpret_cast<fasttest::SampleEnumCopy*>(&hdr) : NULL;
 9145}
 9146
 9147// --- fasttest.SampleEnumCopy.base.Castbase
 9148inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SampleEnumCopy& parent) {
 9149    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9150}
 9151
 9152// --- fasttest.SampleEnumCopy..GetMsgLength
 9153// Message length (uses length field)
 9154inline i32 fasttest::GetMsgLength(const fasttest::SampleEnumCopy& parent) {
 9155    return i32(const_cast<fasttest::SampleEnumCopy&>(parent).length);
 9156}
 9157
 9158// --- fasttest.SampleEnumCopy..GetMsgMemptr
 9159// Memptr encompassing the message (uses length field)
 9160inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SampleEnumCopy& row) {
 9161    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SampleEnumCopy&>(row).length));
 9162}
 9163
 9164// --- fasttest.SampleEnumCopy..Init
 9165// Set all fields to initial values.
 9166inline void fasttest::SampleEnumCopy_Init(fasttest::SampleEnumCopy& parent) {
 9167    parent.length = u32(ssizeof(parent) + (0));
 9168    parent.id = u32(147);
 9169    parent.Value147 = fasttest_SampleEnumEnum(0);
 9170}
 9171inline fasttest::SampleEnumDefault::SampleEnumDefault() {
 9172    fasttest::SampleEnumDefault_Init(*this);
 9173}
 9174
 9175
 9176// --- fasttest.SampleEnumDefault.base.Castdown
 9177// Check if fasttest::TemplateHeader is an instance of SampleEnumDefault by checking the type field
 9178// If it is, return the pointer of target type.
 9179// Additionally, check if the length field permits valid instance of SampleEnumDefault.
 9180// If not successful, quietly return NULL.
 9181inline fasttest::SampleEnumDefault* fasttest::SampleEnumDefault_Castdown(fasttest::TemplateHeader &hdr) {
 9182    bool cond = hdr.id == (146);
 9183    cond &= i32(hdr.length) >= ssizeof(fasttest::SampleEnumDefault);
 9184    return cond ? reinterpret_cast<fasttest::SampleEnumDefault*>(&hdr) : NULL;
 9185}
 9186
 9187// --- fasttest.SampleEnumDefault.base.Castbase
 9188inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SampleEnumDefault& parent) {
 9189    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9190}
 9191
 9192// --- fasttest.SampleEnumDefault..GetMsgLength
 9193// Message length (uses length field)
 9194inline i32 fasttest::GetMsgLength(const fasttest::SampleEnumDefault& parent) {
 9195    return i32(const_cast<fasttest::SampleEnumDefault&>(parent).length);
 9196}
 9197
 9198// --- fasttest.SampleEnumDefault..GetMsgMemptr
 9199// Memptr encompassing the message (uses length field)
 9200inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SampleEnumDefault& row) {
 9201    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SampleEnumDefault&>(row).length));
 9202}
 9203
 9204// --- fasttest.SampleEnumDefault..Init
 9205// Set all fields to initial values.
 9206inline void fasttest::SampleEnumDefault_Init(fasttest::SampleEnumDefault& parent) {
 9207    parent.length = u32(ssizeof(parent) + (0));
 9208    parent.id = u32(146);
 9209    parent.Value = fasttest_SampleEnumEnum(2);
 9210}
 9211inline fasttest::SampleSetConst::SampleSetConst() {
 9212    fasttest::SampleSetConst_Init(*this);
 9213}
 9214
 9215
 9216// --- fasttest.SampleSetConst.base.Castdown
 9217// Check if fasttest::TemplateHeader is an instance of SampleSetConst by checking the type field
 9218// If it is, return the pointer of target type.
 9219// Additionally, check if the length field permits valid instance of SampleSetConst.
 9220// If not successful, quietly return NULL.
 9221inline fasttest::SampleSetConst* fasttest::SampleSetConst_Castdown(fasttest::TemplateHeader &hdr) {
 9222    bool cond = hdr.id == (148);
 9223    cond &= i32(hdr.length) >= ssizeof(fasttest::SampleSetConst);
 9224    return cond ? reinterpret_cast<fasttest::SampleSetConst*>(&hdr) : NULL;
 9225}
 9226
 9227// --- fasttest.SampleSetConst.base.Castbase
 9228inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SampleSetConst& parent) {
 9229    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9230}
 9231
 9232// --- fasttest.SampleSetConst.Value.Get
 9233inline fasttest::SampleSet fasttest::Value_Get(fasttest::SampleSetConst& parent) {
 9234    (void)parent;
 9235    return fasttest::SampleSet(6);
 9236}
 9237
 9238// --- fasttest.SampleSetConst..GetMsgLength
 9239// Message length (uses length field)
 9240inline i32 fasttest::GetMsgLength(const fasttest::SampleSetConst& parent) {
 9241    return i32(const_cast<fasttest::SampleSetConst&>(parent).length);
 9242}
 9243
 9244// --- fasttest.SampleSetConst..GetMsgMemptr
 9245// Memptr encompassing the message (uses length field)
 9246inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SampleSetConst& row) {
 9247    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SampleSetConst&>(row).length));
 9248}
 9249
 9250// --- fasttest.SampleSetConst..Init
 9251// Set all fields to initial values.
 9252inline void fasttest::SampleSetConst_Init(fasttest::SampleSetConst& parent) {
 9253    parent.length = u32(ssizeof(parent) + (0));
 9254    parent.id = u32(148);
 9255}
 9256inline fasttest::SampleSetCopy::SampleSetCopy() {
 9257    fasttest::SampleSetCopy_Init(*this);
 9258}
 9259
 9260
 9261// --- fasttest.SampleSetCopy.base.Castdown
 9262// Check if fasttest::TemplateHeader is an instance of SampleSetCopy by checking the type field
 9263// If it is, return the pointer of target type.
 9264// Additionally, check if the length field permits valid instance of SampleSetCopy.
 9265// If not successful, quietly return NULL.
 9266inline fasttest::SampleSetCopy* fasttest::SampleSetCopy_Castdown(fasttest::TemplateHeader &hdr) {
 9267    bool cond = hdr.id == (150);
 9268    cond &= i32(hdr.length) >= ssizeof(fasttest::SampleSetCopy);
 9269    return cond ? reinterpret_cast<fasttest::SampleSetCopy*>(&hdr) : NULL;
 9270}
 9271
 9272// --- fasttest.SampleSetCopy.base.Castbase
 9273inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SampleSetCopy& parent) {
 9274    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9275}
 9276
 9277// --- fasttest.SampleSetCopy..GetMsgLength
 9278// Message length (uses length field)
 9279inline i32 fasttest::GetMsgLength(const fasttest::SampleSetCopy& parent) {
 9280    return i32(const_cast<fasttest::SampleSetCopy&>(parent).length);
 9281}
 9282
 9283// --- fasttest.SampleSetCopy..GetMsgMemptr
 9284// Memptr encompassing the message (uses length field)
 9285inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SampleSetCopy& row) {
 9286    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SampleSetCopy&>(row).length));
 9287}
 9288
 9289// --- fasttest.SampleSetCopy..Init
 9290// Set all fields to initial values.
 9291inline void fasttest::SampleSetCopy_Init(fasttest::SampleSetCopy& parent) {
 9292    parent.length = u32(ssizeof(parent) + (0));
 9293    parent.id = u32(150);
 9294    parent.Value150 = fasttest::SampleSet(2);
 9295}
 9296inline fasttest::SampleSetDefault::SampleSetDefault() {
 9297    fasttest::SampleSetDefault_Init(*this);
 9298}
 9299
 9300
 9301// --- fasttest.SampleSetDefault.base.Castdown
 9302// Check if fasttest::TemplateHeader is an instance of SampleSetDefault by checking the type field
 9303// If it is, return the pointer of target type.
 9304// Additionally, check if the length field permits valid instance of SampleSetDefault.
 9305// If not successful, quietly return NULL.
 9306inline fasttest::SampleSetDefault* fasttest::SampleSetDefault_Castdown(fasttest::TemplateHeader &hdr) {
 9307    bool cond = hdr.id == (149);
 9308    cond &= i32(hdr.length) >= ssizeof(fasttest::SampleSetDefault);
 9309    return cond ? reinterpret_cast<fasttest::SampleSetDefault*>(&hdr) : NULL;
 9310}
 9311
 9312// --- fasttest.SampleSetDefault.base.Castbase
 9313inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SampleSetDefault& parent) {
 9314    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9315}
 9316
 9317// --- fasttest.SampleSetDefault..GetMsgLength
 9318// Message length (uses length field)
 9319inline i32 fasttest::GetMsgLength(const fasttest::SampleSetDefault& parent) {
 9320    return i32(const_cast<fasttest::SampleSetDefault&>(parent).length);
 9321}
 9322
 9323// --- fasttest.SampleSetDefault..GetMsgMemptr
 9324// Memptr encompassing the message (uses length field)
 9325inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SampleSetDefault& row) {
 9326    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SampleSetDefault&>(row).length));
 9327}
 9328
 9329// --- fasttest.SampleSetDefault..Init
 9330// Set all fields to initial values.
 9331inline void fasttest::SampleSetDefault_Init(fasttest::SampleSetDefault& parent) {
 9332    parent.length = u32(ssizeof(parent) + (0));
 9333    parent.id = u32(149);
 9334    parent.Value = fasttest::SampleSet(3);
 9335}
 9336inline fasttest::SclConst::SclConst() {
 9337    fasttest::SclConst_Init(*this);
 9338}
 9339
 9340
 9341// --- fasttest.SclConst.base.Castdown
 9342// Check if fasttest::TemplateHeader is an instance of SclConst by checking the type field
 9343// If it is, return the pointer of target type.
 9344// Additionally, check if the length field permits valid instance of SclConst.
 9345// If not successful, quietly return NULL.
 9346inline fasttest::SclConst* fasttest::SclConst_Castdown(fasttest::TemplateHeader &hdr) {
 9347    bool cond = hdr.id == (25);
 9348    cond &= i32(hdr.length) >= ssizeof(fasttest::SclConst);
 9349    return cond ? reinterpret_cast<fasttest::SclConst*>(&hdr) : NULL;
 9350}
 9351
 9352// --- fasttest.SclConst.base.Castbase
 9353inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclConst& parent) {
 9354    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9355}
 9356
 9357// --- fasttest.SclConst.Value.Get
 9358inline algo::Decimal fasttest::Value_Get(fasttest::SclConst& parent) {
 9359    (void)parent;
 9360    return algo::Decimal(algo::Decimal(-2,25));
 9361}
 9362
 9363// --- fasttest.SclConst..GetMsgLength
 9364// Message length (uses length field)
 9365inline i32 fasttest::GetMsgLength(const fasttest::SclConst& parent) {
 9366    return i32(const_cast<fasttest::SclConst&>(parent).length);
 9367}
 9368
 9369// --- fasttest.SclConst..GetMsgMemptr
 9370// Memptr encompassing the message (uses length field)
 9371inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclConst& row) {
 9372    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclConst&>(row).length));
 9373}
 9374
 9375// --- fasttest.SclConst..Init
 9376// Set all fields to initial values.
 9377inline void fasttest::SclConst_Init(fasttest::SclConst& parent) {
 9378    parent.length = u32(ssizeof(parent) + (0));
 9379    parent.id = u32(25);
 9380}
 9381inline fasttest::SclConstOpt::SclConstOpt() {
 9382    fasttest::SclConstOpt_Init(*this);
 9383}
 9384
 9385
 9386// --- fasttest.SclConstOpt.base.Castdown
 9387// Check if fasttest::TemplateHeader is an instance of SclConstOpt by checking the type field
 9388// If it is, return the pointer of target type.
 9389// Additionally, check if the length field permits valid instance of SclConstOpt.
 9390// If not successful, quietly return NULL.
 9391inline fasttest::SclConstOpt* fasttest::SclConstOpt_Castdown(fasttest::TemplateHeader &hdr) {
 9392    bool cond = hdr.id == (26);
 9393    cond &= i32(hdr.length) >= ssizeof(fasttest::SclConstOpt);
 9394    return cond ? reinterpret_cast<fasttest::SclConstOpt*>(&hdr) : NULL;
 9395}
 9396
 9397// --- fasttest.SclConstOpt.base.Castbase
 9398inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclConstOpt& parent) {
 9399    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9400}
 9401
 9402// --- fasttest.SclConstOpt.pmask.N
 9403// Return constant 1
 9404inline int fasttest::pmask_N(fasttest::SclConstOpt& parent) {
 9405    (void)parent;
 9406    return 1;
 9407}
 9408
 9409// --- fasttest.SclConstOpt.pmask.qFind
 9410// Access value
 9411inline u32& fasttest::pmask_qFind(fasttest::SclConstOpt& parent, int) {
 9412    return parent.pmask;
 9413}
 9414
 9415// --- fasttest.SclConstOpt.pmask.NBits
 9416// Get max # of bits in the bitset
 9417// Return max. number of bits supported by array
 9418inline int fasttest::pmask_Nbits(fasttest::SclConstOpt& parent) {
 9419    return pmask_N(parent) * 32;
 9420}
 9421
 9422// --- fasttest.SclConstOpt.pmask.qGetBit
 9423// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 9424inline bool fasttest::pmask_qGetBit(fasttest::SclConstOpt& parent, u32 bit_idx) {
 9425    u64 elem_idx = bit_idx >> 5;
 9426    u64 shift = bit_idx & 31;
 9427    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 9428    return bool((elem >> shift) & 1); // extract bit
 9429}
 9430
 9431// --- fasttest.SclConstOpt.pmask.GetBit
 9432// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 9433inline bool fasttest::pmask_GetBit(fasttest::SclConstOpt& parent, u32 bit_idx) {
 9434    u64 elem_idx = bit_idx >> 5;
 9435    u64 shift = bit_idx & 31;
 9436    bool ret = false;
 9437    u64 lim = pmask_N(parent);
 9438    if (elem_idx < lim) {
 9439        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 9440        ret = (elem >> shift) & 1;                 // extract bit
 9441    }
 9442    return ret;
 9443}
 9444
 9445// --- fasttest.SclConstOpt.pmask.BitsEmptyQ
 9446// Check if all the bits in the bitset are equal to zero
 9447inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclConstOpt& parent) {
 9448    bool retval = true;
 9449    u64 n = pmask_N(parent);
 9450    for (u64 i = 0; i < n; i++) {
 9451        if (pmask_qFind(parent,i) != 0) {
 9452            retval = false;
 9453            break;
 9454        }
 9455    }
 9456    return retval;
 9457}
 9458
 9459// --- fasttest.SclConstOpt.pmask.Sum1s
 9460inline u64 fasttest::pmask_Sum1s(fasttest::SclConstOpt& parent) {
 9461    u64 sum = 0;
 9462    u64 n = pmask_N(parent);
 9463    for (u64 i = 0; i < n; i++) {
 9464        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 9465    }
 9466    return sum;
 9467}
 9468
 9469// --- fasttest.SclConstOpt.pmask.qClearBit
 9470// Clear bit # BIT_IDX in bit set. No bounds checking
 9471inline void fasttest::pmask_qClearBit(fasttest::SclConstOpt& parent, u32 bit_idx) {
 9472    u64 elem_idx = bit_idx >> 5;
 9473    u64 shift = bit_idx & 31;
 9474    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9475    elem = elem & ~(u32(1) << shift); // clear bit
 9476}
 9477
 9478// --- fasttest.SclConstOpt.pmask.ClearBit
 9479// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 9480inline void fasttest::pmask_ClearBit(fasttest::SclConstOpt& parent, u32 bit_idx) {
 9481    u64 elem_idx = bit_idx >> 5;
 9482    u64 shift = bit_idx & 31;
 9483    u64 lim = pmask_N(parent);
 9484    if (elem_idx < lim) {
 9485        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9486        elem = elem & ~(u32(1) << shift); // clear bit
 9487    }
 9488}
 9489
 9490// --- fasttest.SclConstOpt.pmask.qSetBit
 9491// Set bit # BIT_IDX in bit set. No bounds checking
 9492inline void fasttest::pmask_qSetBit(fasttest::SclConstOpt& parent, u32 bit_idx) {
 9493    u64 elem_idx = bit_idx >> 5;
 9494    u64 shift = bit_idx & 31;
 9495    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9496    elem = elem | (u32(1) << shift); // set bit
 9497}
 9498
 9499// --- fasttest.SclConstOpt.pmask.SetBit
 9500// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 9501inline void fasttest::pmask_SetBit(fasttest::SclConstOpt& parent, u32 bit_idx) {
 9502    u64 elem_idx = bit_idx >> 5;
 9503    u64 shift = bit_idx & 31;
 9504    u64 lim = pmask_N(parent);
 9505    if (elem_idx < lim) {
 9506        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9507        elem = elem | (u32(1) << shift); // set bit
 9508    }
 9509}
 9510
 9511// --- fasttest.SclConstOpt.pmask.qSetBitVal
 9512// Set bit # BIT_IDX in bit set. No bounds checking
 9513inline void fasttest::pmask_qSetBitVal(fasttest::SclConstOpt& parent, u32 bit_idx, bool val) {
 9514    u64 elem_idx = bit_idx >> 5;
 9515    u64 shift = bit_idx & 31;
 9516    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9517    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 9518}
 9519
 9520// --- fasttest.SclConstOpt.pmask.qOrBitVal
 9521// Or bit # BIT_IDX in bit set. No bounds checking
 9522inline void fasttest::pmask_qOrBitVal(fasttest::SclConstOpt& parent, u32 bit_idx, bool val) {
 9523    u64 elem_idx = bit_idx >> 5;
 9524    u64 shift = bit_idx & 31;
 9525    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9526    elem = elem | (u32(val) << shift); // Or in val into elem
 9527}
 9528
 9529// --- fasttest.SclConstOpt.pmask.ClearBitsAll
 9530// Set all bits of array to zero.
 9531// Note: this does not change what NBits will return.
 9532inline void fasttest::pmask_ClearBitsAll(fasttest::SclConstOpt& parent) {
 9533    u64 n = pmask_N(parent);
 9534    for (u64 i = 0; i < n; i++) {
 9535        pmask_qFind(parent, i) = 0;
 9536    }
 9537}
 9538
 9539// --- fasttest.SclConstOpt.pmask.ClearBits
 9540// Zero in PARENT any bits that are set in RHS.
 9541inline void fasttest::pmask_ClearBits(fasttest::SclConstOpt& parent, fasttest::SclConstOpt &rhs) {
 9542    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 9543    for (u64 i = 0; i < n; i++) {
 9544        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 9545    }
 9546}
 9547
 9548// --- fasttest.SclConstOpt.pmask.OrBits
 9549// Set PARENT to union of two bitsets.
 9550// (This function is not named Set.. to avoid triple entendre).
 9551inline void fasttest::pmask_OrBits(fasttest::SclConstOpt& parent, fasttest::SclConstOpt &rhs) {
 9552    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 9553    for (u64 i = 0; i < n; i++) {
 9554        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 9555    }
 9556}
 9557
 9558// --- fasttest.SclConstOpt.pmask.Sup
 9559// Return smallest number N such that indexes of all 1 bits are below N
 9560inline i32 fasttest::pmask_Sup(fasttest::SclConstOpt& parent) {
 9561    u64 lim = pmask_N(parent);
 9562    i32 ret = 0;
 9563    for (int i = lim-1; i >= 0; i--) {
 9564        u32 &val = pmask_qFind(parent, i);
 9565        if (val) {
 9566            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 9567            ret = i * 32 + bitidx;
 9568            break;
 9569        }
 9570    }
 9571    return ret;
 9572}
 9573
 9574// --- fasttest.SclConstOpt.Value.PresentQ
 9575// Return true if the field is marked in the presence mask
 9576inline bool fasttest::Value_PresentQ(fasttest::SclConstOpt& parent) {
 9577    return pmask_qGetBit(parent, 0);
 9578}
 9579
 9580// --- fasttest.SclConstOpt.Value.SetPresent
 9581// Set presence bit for this field in the pmask
 9582inline void fasttest::Value_SetPresent(fasttest::SclConstOpt& parent) {
 9583    pmask_qSetBit(parent, 0); // mark presence in pmask
 9584}
 9585
 9586// --- fasttest.SclConstOpt.Value.Present_GetBit
 9587// Return field's bit number in the pmask
 9588inline int fasttest::Value_Present_GetBit(fasttest::SclConstOpt& parent) {
 9589    int retval = 0;
 9590    (void)parent;//only to avoid -Wunused-parameter
 9591    return retval;
 9592}
 9593
 9594// --- fasttest.SclConstOpt.Value.Get
 9595inline algo::Decimal fasttest::Value_Get(fasttest::SclConstOpt& parent) {
 9596    (void)parent;
 9597    return algo::Decimal(algo::Decimal(2,26));
 9598}
 9599
 9600// --- fasttest.SclConstOpt.pmask_bitcurs.Reset
 9601inline void fasttest::SclConstOpt_pmask_bitcurs_Reset(SclConstOpt_pmask_bitcurs &curs, fasttest::SclConstOpt &parent) {
 9602    curs.elems = &pmask_qFind(parent,0);
 9603    curs.n_elems = pmask_N(parent);
 9604    curs.bit = -1;
 9605    SclConstOpt_pmask_bitcurs_Next(curs);
 9606}
 9607
 9608// --- fasttest.SclConstOpt.pmask_bitcurs.ValidQ
 9609// cursor points to valid item
 9610inline bool fasttest::SclConstOpt_pmask_bitcurs_ValidQ(SclConstOpt_pmask_bitcurs &curs) {
 9611    return curs.bit < curs.n_elems*32;
 9612}
 9613
 9614// --- fasttest.SclConstOpt.pmask_bitcurs.Access
 9615// item access
 9616inline int& fasttest::SclConstOpt_pmask_bitcurs_Access(SclConstOpt_pmask_bitcurs &curs) {
 9617    return curs.bit;
 9618}
 9619
 9620// --- fasttest.SclConstOpt..GetMsgLength
 9621// Message length (uses length field)
 9622inline i32 fasttest::GetMsgLength(const fasttest::SclConstOpt& parent) {
 9623    return i32(const_cast<fasttest::SclConstOpt&>(parent).length);
 9624}
 9625
 9626// --- fasttest.SclConstOpt..GetMsgMemptr
 9627// Memptr encompassing the message (uses length field)
 9628inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclConstOpt& row) {
 9629    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclConstOpt&>(row).length));
 9630}
 9631
 9632// --- fasttest.SclConstOpt..Init
 9633// Set all fields to initial values.
 9634inline void fasttest::SclConstOpt_Init(fasttest::SclConstOpt& parent) {
 9635    parent.length = u32(ssizeof(parent) + (0));
 9636    parent.id = u32(26);
 9637    parent.pmask = u32(0);
 9638}
 9639inline fasttest::SclCopy::SclCopy() {
 9640    fasttest::SclCopy_Init(*this);
 9641}
 9642
 9643
 9644// --- fasttest.SclCopy.base.Castdown
 9645// Check if fasttest::TemplateHeader is an instance of SclCopy by checking the type field
 9646// If it is, return the pointer of target type.
 9647// Additionally, check if the length field permits valid instance of SclCopy.
 9648// If not successful, quietly return NULL.
 9649inline fasttest::SclCopy* fasttest::SclCopy_Castdown(fasttest::TemplateHeader &hdr) {
 9650    bool cond = hdr.id == (61);
 9651    cond &= i32(hdr.length) >= ssizeof(fasttest::SclCopy);
 9652    return cond ? reinterpret_cast<fasttest::SclCopy*>(&hdr) : NULL;
 9653}
 9654
 9655// --- fasttest.SclCopy.base.Castbase
 9656inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclCopy& parent) {
 9657    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9658}
 9659
 9660// --- fasttest.SclCopy..GetMsgLength
 9661// Message length (uses length field)
 9662inline i32 fasttest::GetMsgLength(const fasttest::SclCopy& parent) {
 9663    return i32(const_cast<fasttest::SclCopy&>(parent).length);
 9664}
 9665
 9666// --- fasttest.SclCopy..GetMsgMemptr
 9667// Memptr encompassing the message (uses length field)
 9668inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclCopy& row) {
 9669    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclCopy&>(row).length));
 9670}
 9671
 9672// --- fasttest.SclCopy..Init
 9673// Set all fields to initial values.
 9674inline void fasttest::SclCopy_Init(fasttest::SclCopy& parent) {
 9675    parent.length = u32(ssizeof(parent) + (0));
 9676    parent.id = u32(61);
 9677    parent.Value61 = algo::Decimal(algo::Decimal(-2,-61));
 9678}
 9679inline fasttest::SclCopyNull::SclCopyNull() {
 9680    fasttest::SclCopyNull_Init(*this);
 9681}
 9682
 9683
 9684// --- fasttest.SclCopyNull.base.Castdown
 9685// Check if fasttest::TemplateHeader is an instance of SclCopyNull by checking the type field
 9686// If it is, return the pointer of target type.
 9687// Additionally, check if the length field permits valid instance of SclCopyNull.
 9688// If not successful, quietly return NULL.
 9689inline fasttest::SclCopyNull* fasttest::SclCopyNull_Castdown(fasttest::TemplateHeader &hdr) {
 9690    bool cond = hdr.id == (63);
 9691    cond &= i32(hdr.length) >= ssizeof(fasttest::SclCopyNull);
 9692    return cond ? reinterpret_cast<fasttest::SclCopyNull*>(&hdr) : NULL;
 9693}
 9694
 9695// --- fasttest.SclCopyNull.base.Castbase
 9696inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclCopyNull& parent) {
 9697    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9698}
 9699
 9700// --- fasttest.SclCopyNull.pmask.N
 9701// Return constant 1
 9702inline int fasttest::pmask_N(fasttest::SclCopyNull& parent) {
 9703    (void)parent;
 9704    return 1;
 9705}
 9706
 9707// --- fasttest.SclCopyNull.pmask.qFind
 9708// Access value
 9709inline u32& fasttest::pmask_qFind(fasttest::SclCopyNull& parent, int) {
 9710    return parent.pmask;
 9711}
 9712
 9713// --- fasttest.SclCopyNull.pmask.NBits
 9714// Get max # of bits in the bitset
 9715// Return max. number of bits supported by array
 9716inline int fasttest::pmask_Nbits(fasttest::SclCopyNull& parent) {
 9717    return pmask_N(parent) * 32;
 9718}
 9719
 9720// --- fasttest.SclCopyNull.pmask.qGetBit
 9721// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 9722inline bool fasttest::pmask_qGetBit(fasttest::SclCopyNull& parent, u32 bit_idx) {
 9723    u64 elem_idx = bit_idx >> 5;
 9724    u64 shift = bit_idx & 31;
 9725    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 9726    return bool((elem >> shift) & 1); // extract bit
 9727}
 9728
 9729// --- fasttest.SclCopyNull.pmask.GetBit
 9730// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 9731inline bool fasttest::pmask_GetBit(fasttest::SclCopyNull& parent, u32 bit_idx) {
 9732    u64 elem_idx = bit_idx >> 5;
 9733    u64 shift = bit_idx & 31;
 9734    bool ret = false;
 9735    u64 lim = pmask_N(parent);
 9736    if (elem_idx < lim) {
 9737        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 9738        ret = (elem >> shift) & 1;                 // extract bit
 9739    }
 9740    return ret;
 9741}
 9742
 9743// --- fasttest.SclCopyNull.pmask.BitsEmptyQ
 9744// Check if all the bits in the bitset are equal to zero
 9745inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclCopyNull& parent) {
 9746    bool retval = true;
 9747    u64 n = pmask_N(parent);
 9748    for (u64 i = 0; i < n; i++) {
 9749        if (pmask_qFind(parent,i) != 0) {
 9750            retval = false;
 9751            break;
 9752        }
 9753    }
 9754    return retval;
 9755}
 9756
 9757// --- fasttest.SclCopyNull.pmask.Sum1s
 9758inline u64 fasttest::pmask_Sum1s(fasttest::SclCopyNull& parent) {
 9759    u64 sum = 0;
 9760    u64 n = pmask_N(parent);
 9761    for (u64 i = 0; i < n; i++) {
 9762        sum += algo::u32_Count1s(pmask_qFind(parent, i));
 9763    }
 9764    return sum;
 9765}
 9766
 9767// --- fasttest.SclCopyNull.pmask.qClearBit
 9768// Clear bit # BIT_IDX in bit set. No bounds checking
 9769inline void fasttest::pmask_qClearBit(fasttest::SclCopyNull& parent, u32 bit_idx) {
 9770    u64 elem_idx = bit_idx >> 5;
 9771    u64 shift = bit_idx & 31;
 9772    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9773    elem = elem & ~(u32(1) << shift); // clear bit
 9774}
 9775
 9776// --- fasttest.SclCopyNull.pmask.ClearBit
 9777// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
 9778inline void fasttest::pmask_ClearBit(fasttest::SclCopyNull& parent, u32 bit_idx) {
 9779    u64 elem_idx = bit_idx >> 5;
 9780    u64 shift = bit_idx & 31;
 9781    u64 lim = pmask_N(parent);
 9782    if (elem_idx < lim) {
 9783        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9784        elem = elem & ~(u32(1) << shift); // clear bit
 9785    }
 9786}
 9787
 9788// --- fasttest.SclCopyNull.pmask.qSetBit
 9789// Set bit # BIT_IDX in bit set. No bounds checking
 9790inline void fasttest::pmask_qSetBit(fasttest::SclCopyNull& parent, u32 bit_idx) {
 9791    u64 elem_idx = bit_idx >> 5;
 9792    u64 shift = bit_idx & 31;
 9793    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9794    elem = elem | (u32(1) << shift); // set bit
 9795}
 9796
 9797// --- fasttest.SclCopyNull.pmask.SetBit
 9798// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
 9799inline void fasttest::pmask_SetBit(fasttest::SclCopyNull& parent, u32 bit_idx) {
 9800    u64 elem_idx = bit_idx >> 5;
 9801    u64 shift = bit_idx & 31;
 9802    u64 lim = pmask_N(parent);
 9803    if (elem_idx < lim) {
 9804        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9805        elem = elem | (u32(1) << shift); // set bit
 9806    }
 9807}
 9808
 9809// --- fasttest.SclCopyNull.pmask.qSetBitVal
 9810// Set bit # BIT_IDX in bit set. No bounds checking
 9811inline void fasttest::pmask_qSetBitVal(fasttest::SclCopyNull& parent, u32 bit_idx, bool val) {
 9812    u64 elem_idx = bit_idx >> 5;
 9813    u64 shift = bit_idx & 31;
 9814    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9815    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
 9816}
 9817
 9818// --- fasttest.SclCopyNull.pmask.qOrBitVal
 9819// Or bit # BIT_IDX in bit set. No bounds checking
 9820inline void fasttest::pmask_qOrBitVal(fasttest::SclCopyNull& parent, u32 bit_idx, bool val) {
 9821    u64 elem_idx = bit_idx >> 5;
 9822    u64 shift = bit_idx & 31;
 9823    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
 9824    elem = elem | (u32(val) << shift); // Or in val into elem
 9825}
 9826
 9827// --- fasttest.SclCopyNull.pmask.ClearBitsAll
 9828// Set all bits of array to zero.
 9829// Note: this does not change what NBits will return.
 9830inline void fasttest::pmask_ClearBitsAll(fasttest::SclCopyNull& parent) {
 9831    u64 n = pmask_N(parent);
 9832    for (u64 i = 0; i < n; i++) {
 9833        pmask_qFind(parent, i) = 0;
 9834    }
 9835}
 9836
 9837// --- fasttest.SclCopyNull.pmask.ClearBits
 9838// Zero in PARENT any bits that are set in RHS.
 9839inline void fasttest::pmask_ClearBits(fasttest::SclCopyNull& parent, fasttest::SclCopyNull &rhs) {
 9840    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 9841    for (u64 i = 0; i < n; i++) {
 9842        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
 9843    }
 9844}
 9845
 9846// --- fasttest.SclCopyNull.pmask.OrBits
 9847// Set PARENT to union of two bitsets.
 9848// (This function is not named Set.. to avoid triple entendre).
 9849inline void fasttest::pmask_OrBits(fasttest::SclCopyNull& parent, fasttest::SclCopyNull &rhs) {
 9850    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
 9851    for (u64 i = 0; i < n; i++) {
 9852        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
 9853    }
 9854}
 9855
 9856// --- fasttest.SclCopyNull.pmask.Sup
 9857// Return smallest number N such that indexes of all 1 bits are below N
 9858inline i32 fasttest::pmask_Sup(fasttest::SclCopyNull& parent) {
 9859    u64 lim = pmask_N(parent);
 9860    i32 ret = 0;
 9861    for (int i = lim-1; i >= 0; i--) {
 9862        u32 &val = pmask_qFind(parent, i);
 9863        if (val) {
 9864            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
 9865            ret = i * 32 + bitidx;
 9866            break;
 9867        }
 9868    }
 9869    return ret;
 9870}
 9871
 9872// --- fasttest.SclCopyNull.Value63.PresentQ
 9873// Return true if the field is marked in the presence mask
 9874inline bool fasttest::Value63_PresentQ(fasttest::SclCopyNull& parent) {
 9875    return pmask_qGetBit(parent, 0);
 9876}
 9877
 9878// --- fasttest.SclCopyNull.Value63.SetPresent
 9879// Set presence bit for this field in the pmask
 9880inline void fasttest::Value63_SetPresent(fasttest::SclCopyNull& parent) {
 9881    pmask_qSetBit(parent, 0); // mark presence in pmask
 9882}
 9883
 9884// --- fasttest.SclCopyNull.Value63.Present_GetBit
 9885// Return field's bit number in the pmask
 9886inline int fasttest::Value63_Present_GetBit(fasttest::SclCopyNull& parent) {
 9887    int retval = 0;
 9888    (void)parent;//only to avoid -Wunused-parameter
 9889    return retval;
 9890}
 9891
 9892// --- fasttest.SclCopyNull.Value63.Set
 9893inline void fasttest::Value63_Set(fasttest::SclCopyNull& parent, algo::Decimal rhs) {
 9894    parent.Value63 = rhs;
 9895    pmask_qSetBit(parent, 0); // mark presence in pmask
 9896}
 9897
 9898// --- fasttest.SclCopyNull.pmask_bitcurs.Reset
 9899inline void fasttest::SclCopyNull_pmask_bitcurs_Reset(SclCopyNull_pmask_bitcurs &curs, fasttest::SclCopyNull &parent) {
 9900    curs.elems = &pmask_qFind(parent,0);
 9901    curs.n_elems = pmask_N(parent);
 9902    curs.bit = -1;
 9903    SclCopyNull_pmask_bitcurs_Next(curs);
 9904}
 9905
 9906// --- fasttest.SclCopyNull.pmask_bitcurs.ValidQ
 9907// cursor points to valid item
 9908inline bool fasttest::SclCopyNull_pmask_bitcurs_ValidQ(SclCopyNull_pmask_bitcurs &curs) {
 9909    return curs.bit < curs.n_elems*32;
 9910}
 9911
 9912// --- fasttest.SclCopyNull.pmask_bitcurs.Access
 9913// item access
 9914inline int& fasttest::SclCopyNull_pmask_bitcurs_Access(SclCopyNull_pmask_bitcurs &curs) {
 9915    return curs.bit;
 9916}
 9917
 9918// --- fasttest.SclCopyNull..GetMsgLength
 9919// Message length (uses length field)
 9920inline i32 fasttest::GetMsgLength(const fasttest::SclCopyNull& parent) {
 9921    return i32(const_cast<fasttest::SclCopyNull&>(parent).length);
 9922}
 9923
 9924// --- fasttest.SclCopyNull..GetMsgMemptr
 9925// Memptr encompassing the message (uses length field)
 9926inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclCopyNull& row) {
 9927    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclCopyNull&>(row).length));
 9928}
 9929
 9930// --- fasttest.SclCopyNull..Init
 9931// Set all fields to initial values.
 9932inline void fasttest::SclCopyNull_Init(fasttest::SclCopyNull& parent) {
 9933    parent.length = u32(ssizeof(parent) + (0));
 9934    parent.id = u32(63);
 9935    parent.pmask = u32(0);
 9936    parent.Value63 = algo::Decimal(algo::Decimal(0,0));
 9937}
 9938inline fasttest::SclCopyOpt::SclCopyOpt() {
 9939    fasttest::SclCopyOpt_Init(*this);
 9940}
 9941
 9942
 9943// --- fasttest.SclCopyOpt.base.Castdown
 9944// Check if fasttest::TemplateHeader is an instance of SclCopyOpt by checking the type field
 9945// If it is, return the pointer of target type.
 9946// Additionally, check if the length field permits valid instance of SclCopyOpt.
 9947// If not successful, quietly return NULL.
 9948inline fasttest::SclCopyOpt* fasttest::SclCopyOpt_Castdown(fasttest::TemplateHeader &hdr) {
 9949    bool cond = hdr.id == (62);
 9950    cond &= i32(hdr.length) >= ssizeof(fasttest::SclCopyOpt);
 9951    return cond ? reinterpret_cast<fasttest::SclCopyOpt*>(&hdr) : NULL;
 9952}
 9953
 9954// --- fasttest.SclCopyOpt.base.Castbase
 9955inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclCopyOpt& parent) {
 9956    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
 9957}
 9958
 9959// --- fasttest.SclCopyOpt.pmask.N
 9960// Return constant 1
 9961inline int fasttest::pmask_N(fasttest::SclCopyOpt& parent) {
 9962    (void)parent;
 9963    return 1;
 9964}
 9965
 9966// --- fasttest.SclCopyOpt.pmask.qFind
 9967// Access value
 9968inline u32& fasttest::pmask_qFind(fasttest::SclCopyOpt& parent, int) {
 9969    return parent.pmask;
 9970}
 9971
 9972// --- fasttest.SclCopyOpt.pmask.NBits
 9973// Get max # of bits in the bitset
 9974// Return max. number of bits supported by array
 9975inline int fasttest::pmask_Nbits(fasttest::SclCopyOpt& parent) {
 9976    return pmask_N(parent) * 32;
 9977}
 9978
 9979// --- fasttest.SclCopyOpt.pmask.qGetBit
 9980// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
 9981inline bool fasttest::pmask_qGetBit(fasttest::SclCopyOpt& parent, u32 bit_idx) {
 9982    u64 elem_idx = bit_idx >> 5;
 9983    u64 shift = bit_idx & 31;
 9984    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 9985    return bool((elem >> shift) & 1); // extract bit
 9986}
 9987
 9988// --- fasttest.SclCopyOpt.pmask.GetBit
 9989// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
 9990inline bool fasttest::pmask_GetBit(fasttest::SclCopyOpt& parent, u32 bit_idx) {
 9991    u64 elem_idx = bit_idx >> 5;
 9992    u64 shift = bit_idx & 31;
 9993    bool ret = false;
 9994    u64 lim = pmask_N(parent);
 9995    if (elem_idx < lim) {
 9996        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
 9997        ret = (elem >> shift) & 1;                 // extract bit
 9998    }
 9999    return ret;
10000}
10001
10002// --- fasttest.SclCopyOpt.pmask.BitsEmptyQ
10003// Check if all the bits in the bitset are equal to zero
10004inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclCopyOpt& parent) {
10005    bool retval = true;
10006    u64 n = pmask_N(parent);
10007    for (u64 i = 0; i < n; i++) {
10008        if (pmask_qFind(parent,i) != 0) {
10009            retval = false;
10010            break;
10011        }
10012    }
10013    return retval;
10014}
10015
10016// --- fasttest.SclCopyOpt.pmask.Sum1s
10017inline u64 fasttest::pmask_Sum1s(fasttest::SclCopyOpt& parent) {
10018    u64 sum = 0;
10019    u64 n = pmask_N(parent);
10020    for (u64 i = 0; i < n; i++) {
10021        sum += algo::u32_Count1s(pmask_qFind(parent, i));
10022    }
10023    return sum;
10024}
10025
10026// --- fasttest.SclCopyOpt.pmask.qClearBit
10027// Clear bit # BIT_IDX in bit set. No bounds checking
10028inline void fasttest::pmask_qClearBit(fasttest::SclCopyOpt& parent, u32 bit_idx) {
10029    u64 elem_idx = bit_idx >> 5;
10030    u64 shift = bit_idx & 31;
10031    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10032    elem = elem & ~(u32(1) << shift); // clear bit
10033}
10034
10035// --- fasttest.SclCopyOpt.pmask.ClearBit
10036// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
10037inline void fasttest::pmask_ClearBit(fasttest::SclCopyOpt& parent, u32 bit_idx) {
10038    u64 elem_idx = bit_idx >> 5;
10039    u64 shift = bit_idx & 31;
10040    u64 lim = pmask_N(parent);
10041    if (elem_idx < lim) {
10042        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10043        elem = elem & ~(u32(1) << shift); // clear bit
10044    }
10045}
10046
10047// --- fasttest.SclCopyOpt.pmask.qSetBit
10048// Set bit # BIT_IDX in bit set. No bounds checking
10049inline void fasttest::pmask_qSetBit(fasttest::SclCopyOpt& parent, u32 bit_idx) {
10050    u64 elem_idx = bit_idx >> 5;
10051    u64 shift = bit_idx & 31;
10052    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10053    elem = elem | (u32(1) << shift); // set bit
10054}
10055
10056// --- fasttest.SclCopyOpt.pmask.SetBit
10057// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
10058inline void fasttest::pmask_SetBit(fasttest::SclCopyOpt& parent, u32 bit_idx) {
10059    u64 elem_idx = bit_idx >> 5;
10060    u64 shift = bit_idx & 31;
10061    u64 lim = pmask_N(parent);
10062    if (elem_idx < lim) {
10063        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10064        elem = elem | (u32(1) << shift); // set bit
10065    }
10066}
10067
10068// --- fasttest.SclCopyOpt.pmask.qSetBitVal
10069// Set bit # BIT_IDX in bit set. No bounds checking
10070inline void fasttest::pmask_qSetBitVal(fasttest::SclCopyOpt& parent, u32 bit_idx, bool val) {
10071    u64 elem_idx = bit_idx >> 5;
10072    u64 shift = bit_idx & 31;
10073    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10074    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
10075}
10076
10077// --- fasttest.SclCopyOpt.pmask.qOrBitVal
10078// Or bit # BIT_IDX in bit set. No bounds checking
10079inline void fasttest::pmask_qOrBitVal(fasttest::SclCopyOpt& parent, u32 bit_idx, bool val) {
10080    u64 elem_idx = bit_idx >> 5;
10081    u64 shift = bit_idx & 31;
10082    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10083    elem = elem | (u32(val) << shift); // Or in val into elem
10084}
10085
10086// --- fasttest.SclCopyOpt.pmask.ClearBitsAll
10087// Set all bits of array to zero.
10088// Note: this does not change what NBits will return.
10089inline void fasttest::pmask_ClearBitsAll(fasttest::SclCopyOpt& parent) {
10090    u64 n = pmask_N(parent);
10091    for (u64 i = 0; i < n; i++) {
10092        pmask_qFind(parent, i) = 0;
10093    }
10094}
10095
10096// --- fasttest.SclCopyOpt.pmask.ClearBits
10097// Zero in PARENT any bits that are set in RHS.
10098inline void fasttest::pmask_ClearBits(fasttest::SclCopyOpt& parent, fasttest::SclCopyOpt &rhs) {
10099    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
10100    for (u64 i = 0; i < n; i++) {
10101        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
10102    }
10103}
10104
10105// --- fasttest.SclCopyOpt.pmask.OrBits
10106// Set PARENT to union of two bitsets.
10107// (This function is not named Set.. to avoid triple entendre).
10108inline void fasttest::pmask_OrBits(fasttest::SclCopyOpt& parent, fasttest::SclCopyOpt &rhs) {
10109    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
10110    for (u64 i = 0; i < n; i++) {
10111        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
10112    }
10113}
10114
10115// --- fasttest.SclCopyOpt.pmask.Sup
10116// Return smallest number N such that indexes of all 1 bits are below N
10117inline i32 fasttest::pmask_Sup(fasttest::SclCopyOpt& parent) {
10118    u64 lim = pmask_N(parent);
10119    i32 ret = 0;
10120    for (int i = lim-1; i >= 0; i--) {
10121        u32 &val = pmask_qFind(parent, i);
10122        if (val) {
10123            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
10124            ret = i * 32 + bitidx;
10125            break;
10126        }
10127    }
10128    return ret;
10129}
10130
10131// --- fasttest.SclCopyOpt.Value62.PresentQ
10132// Return true if the field is marked in the presence mask
10133inline bool fasttest::Value62_PresentQ(fasttest::SclCopyOpt& parent) {
10134    return pmask_qGetBit(parent, 0);
10135}
10136
10137// --- fasttest.SclCopyOpt.Value62.SetPresent
10138// Set presence bit for this field in the pmask
10139inline void fasttest::Value62_SetPresent(fasttest::SclCopyOpt& parent) {
10140    pmask_qSetBit(parent, 0); // mark presence in pmask
10141}
10142
10143// --- fasttest.SclCopyOpt.Value62.Present_GetBit
10144// Return field's bit number in the pmask
10145inline int fasttest::Value62_Present_GetBit(fasttest::SclCopyOpt& parent) {
10146    int retval = 0;
10147    (void)parent;//only to avoid -Wunused-parameter
10148    return retval;
10149}
10150
10151// --- fasttest.SclCopyOpt.Value62.Set
10152inline void fasttest::Value62_Set(fasttest::SclCopyOpt& parent, algo::Decimal rhs) {
10153    parent.Value62 = rhs;
10154    pmask_qSetBit(parent, 0); // mark presence in pmask
10155}
10156
10157// --- fasttest.SclCopyOpt.pmask_bitcurs.Reset
10158inline void fasttest::SclCopyOpt_pmask_bitcurs_Reset(SclCopyOpt_pmask_bitcurs &curs, fasttest::SclCopyOpt &parent) {
10159    curs.elems = &pmask_qFind(parent,0);
10160    curs.n_elems = pmask_N(parent);
10161    curs.bit = -1;
10162    SclCopyOpt_pmask_bitcurs_Next(curs);
10163}
10164
10165// --- fasttest.SclCopyOpt.pmask_bitcurs.ValidQ
10166// cursor points to valid item
10167inline bool fasttest::SclCopyOpt_pmask_bitcurs_ValidQ(SclCopyOpt_pmask_bitcurs &curs) {
10168    return curs.bit < curs.n_elems*32;
10169}
10170
10171// --- fasttest.SclCopyOpt.pmask_bitcurs.Access
10172// item access
10173inline int& fasttest::SclCopyOpt_pmask_bitcurs_Access(SclCopyOpt_pmask_bitcurs &curs) {
10174    return curs.bit;
10175}
10176
10177// --- fasttest.SclCopyOpt..GetMsgLength
10178// Message length (uses length field)
10179inline i32 fasttest::GetMsgLength(const fasttest::SclCopyOpt& parent) {
10180    return i32(const_cast<fasttest::SclCopyOpt&>(parent).length);
10181}
10182
10183// --- fasttest.SclCopyOpt..GetMsgMemptr
10184// Memptr encompassing the message (uses length field)
10185inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclCopyOpt& row) {
10186    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclCopyOpt&>(row).length));
10187}
10188
10189// --- fasttest.SclCopyOpt..Init
10190// Set all fields to initial values.
10191inline void fasttest::SclCopyOpt_Init(fasttest::SclCopyOpt& parent) {
10192    parent.length = u32(ssizeof(parent) + (0));
10193    parent.id = u32(62);
10194    parent.pmask = u32(0);
10195    parent.Value62 = algo::Decimal(algo::Decimal(1,-62));
10196}
10197inline fasttest::SclDelta::SclDelta() {
10198    fasttest::SclDelta_Init(*this);
10199}
10200
10201
10202// --- fasttest.SclDelta.base.Castdown
10203// Check if fasttest::TemplateHeader is an instance of SclDelta by checking the type field
10204// If it is, return the pointer of target type.
10205// Additionally, check if the length field permits valid instance of SclDelta.
10206// If not successful, quietly return NULL.
10207inline fasttest::SclDelta* fasttest::SclDelta_Castdown(fasttest::TemplateHeader &hdr) {
10208    bool cond = hdr.id == (81);
10209    cond &= i32(hdr.length) >= ssizeof(fasttest::SclDelta);
10210    return cond ? reinterpret_cast<fasttest::SclDelta*>(&hdr) : NULL;
10211}
10212
10213// --- fasttest.SclDelta.base.Castbase
10214inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclDelta& parent) {
10215    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
10216}
10217
10218// --- fasttest.SclDelta..GetMsgLength
10219// Message length (uses length field)
10220inline i32 fasttest::GetMsgLength(const fasttest::SclDelta& parent) {
10221    return i32(const_cast<fasttest::SclDelta&>(parent).length);
10222}
10223
10224// --- fasttest.SclDelta..GetMsgMemptr
10225// Memptr encompassing the message (uses length field)
10226inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclDelta& row) {
10227    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclDelta&>(row).length));
10228}
10229
10230// --- fasttest.SclDelta..Init
10231// Set all fields to initial values.
10232inline void fasttest::SclDelta_Init(fasttest::SclDelta& parent) {
10233    parent.length = u32(ssizeof(parent) + (0));
10234    parent.id = u32(81);
10235    parent.Value81 = algo::Decimal(algo::Decimal(-2,-81));
10236}
10237inline fasttest::SclDeltaImpl::SclDeltaImpl() {
10238    fasttest::SclDeltaImpl_Init(*this);
10239}
10240
10241
10242// --- fasttest.SclDeltaImpl.base.Castdown
10243// Check if fasttest::TemplateHeader is an instance of SclDeltaImpl by checking the type field
10244// If it is, return the pointer of target type.
10245// Additionally, check if the length field permits valid instance of SclDeltaImpl.
10246// If not successful, quietly return NULL.
10247inline fasttest::SclDeltaImpl* fasttest::SclDeltaImpl_Castdown(fasttest::TemplateHeader &hdr) {
10248    bool cond = hdr.id == (82);
10249    cond &= i32(hdr.length) >= ssizeof(fasttest::SclDeltaImpl);
10250    return cond ? reinterpret_cast<fasttest::SclDeltaImpl*>(&hdr) : NULL;
10251}
10252
10253// --- fasttest.SclDeltaImpl.base.Castbase
10254inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclDeltaImpl& parent) {
10255    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
10256}
10257
10258// --- fasttest.SclDeltaImpl..GetMsgLength
10259// Message length (uses length field)
10260inline i32 fasttest::GetMsgLength(const fasttest::SclDeltaImpl& parent) {
10261    return i32(const_cast<fasttest::SclDeltaImpl&>(parent).length);
10262}
10263
10264// --- fasttest.SclDeltaImpl..GetMsgMemptr
10265// Memptr encompassing the message (uses length field)
10266inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclDeltaImpl& row) {
10267    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclDeltaImpl&>(row).length));
10268}
10269
10270// --- fasttest.SclDeltaImpl..Init
10271// Set all fields to initial values.
10272inline void fasttest::SclDeltaImpl_Init(fasttest::SclDeltaImpl& parent) {
10273    parent.length = u32(ssizeof(parent) + (0));
10274    parent.id = u32(82);
10275    parent.Value82 = algo::Decimal(algo::Decimal(0,0));
10276}
10277inline fasttest::SclDeltaNull::SclDeltaNull() {
10278    fasttest::SclDeltaNull_Init(*this);
10279}
10280
10281
10282// --- fasttest.SclDeltaNull.base.Castdown
10283// Check if fasttest::TemplateHeader is an instance of SclDeltaNull by checking the type field
10284// If it is, return the pointer of target type.
10285// Additionally, check if the length field permits valid instance of SclDeltaNull.
10286// If not successful, quietly return NULL.
10287inline fasttest::SclDeltaNull* fasttest::SclDeltaNull_Castdown(fasttest::TemplateHeader &hdr) {
10288    bool cond = hdr.id == (84);
10289    cond &= i32(hdr.length) >= ssizeof(fasttest::SclDeltaNull);
10290    return cond ? reinterpret_cast<fasttest::SclDeltaNull*>(&hdr) : NULL;
10291}
10292
10293// --- fasttest.SclDeltaNull.base.Castbase
10294inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclDeltaNull& parent) {
10295    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
10296}
10297
10298// --- fasttest.SclDeltaNull.pmask.N
10299// Return constant 1
10300inline int fasttest::pmask_N(fasttest::SclDeltaNull& parent) {
10301    (void)parent;
10302    return 1;
10303}
10304
10305// --- fasttest.SclDeltaNull.pmask.qFind
10306// Access value
10307inline u32& fasttest::pmask_qFind(fasttest::SclDeltaNull& parent, int) {
10308    return parent.pmask;
10309}
10310
10311// --- fasttest.SclDeltaNull.pmask.NBits
10312// Get max # of bits in the bitset
10313// Return max. number of bits supported by array
10314inline int fasttest::pmask_Nbits(fasttest::SclDeltaNull& parent) {
10315    return pmask_N(parent) * 32;
10316}
10317
10318// --- fasttest.SclDeltaNull.pmask.qGetBit
10319// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
10320inline bool fasttest::pmask_qGetBit(fasttest::SclDeltaNull& parent, u32 bit_idx) {
10321    u64 elem_idx = bit_idx >> 5;
10322    u64 shift = bit_idx & 31;
10323    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
10324    return bool((elem >> shift) & 1); // extract bit
10325}
10326
10327// --- fasttest.SclDeltaNull.pmask.GetBit
10328// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
10329inline bool fasttest::pmask_GetBit(fasttest::SclDeltaNull& parent, u32 bit_idx) {
10330    u64 elem_idx = bit_idx >> 5;
10331    u64 shift = bit_idx & 31;
10332    bool ret = false;
10333    u64 lim = pmask_N(parent);
10334    if (elem_idx < lim) {
10335        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
10336        ret = (elem >> shift) & 1;                 // extract bit
10337    }
10338    return ret;
10339}
10340
10341// --- fasttest.SclDeltaNull.pmask.BitsEmptyQ
10342// Check if all the bits in the bitset are equal to zero
10343inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclDeltaNull& parent) {
10344    bool retval = true;
10345    u64 n = pmask_N(parent);
10346    for (u64 i = 0; i < n; i++) {
10347        if (pmask_qFind(parent,i) != 0) {
10348            retval = false;
10349            break;
10350        }
10351    }
10352    return retval;
10353}
10354
10355// --- fasttest.SclDeltaNull.pmask.Sum1s
10356inline u64 fasttest::pmask_Sum1s(fasttest::SclDeltaNull& parent) {
10357    u64 sum = 0;
10358    u64 n = pmask_N(parent);
10359    for (u64 i = 0; i < n; i++) {
10360        sum += algo::u32_Count1s(pmask_qFind(parent, i));
10361    }
10362    return sum;
10363}
10364
10365// --- fasttest.SclDeltaNull.pmask.qClearBit
10366// Clear bit # BIT_IDX in bit set. No bounds checking
10367inline void fasttest::pmask_qClearBit(fasttest::SclDeltaNull& parent, u32 bit_idx) {
10368    u64 elem_idx = bit_idx >> 5;
10369    u64 shift = bit_idx & 31;
10370    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10371    elem = elem & ~(u32(1) << shift); // clear bit
10372}
10373
10374// --- fasttest.SclDeltaNull.pmask.ClearBit
10375// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
10376inline void fasttest::pmask_ClearBit(fasttest::SclDeltaNull& parent, u32 bit_idx) {
10377    u64 elem_idx = bit_idx >> 5;
10378    u64 shift = bit_idx & 31;
10379    u64 lim = pmask_N(parent);
10380    if (elem_idx < lim) {
10381        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10382        elem = elem & ~(u32(1) << shift); // clear bit
10383    }
10384}
10385
10386// --- fasttest.SclDeltaNull.pmask.qSetBit
10387// Set bit # BIT_IDX in bit set. No bounds checking
10388inline void fasttest::pmask_qSetBit(fasttest::SclDeltaNull& parent, u32 bit_idx) {
10389    u64 elem_idx = bit_idx >> 5;
10390    u64 shift = bit_idx & 31;
10391    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10392    elem = elem | (u32(1) << shift); // set bit
10393}
10394
10395// --- fasttest.SclDeltaNull.pmask.SetBit
10396// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
10397inline void fasttest::pmask_SetBit(fasttest::SclDeltaNull& parent, u32 bit_idx) {
10398    u64 elem_idx = bit_idx >> 5;
10399    u64 shift = bit_idx & 31;
10400    u64 lim = pmask_N(parent);
10401    if (elem_idx < lim) {
10402        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10403        elem = elem | (u32(1) << shift); // set bit
10404    }
10405}
10406
10407// --- fasttest.SclDeltaNull.pmask.qSetBitVal
10408// Set bit # BIT_IDX in bit set. No bounds checking
10409inline void fasttest::pmask_qSetBitVal(fasttest::SclDeltaNull& parent, u32 bit_idx, bool val) {
10410    u64 elem_idx = bit_idx >> 5;
10411    u64 shift = bit_idx & 31;
10412    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10413    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
10414}
10415
10416// --- fasttest.SclDeltaNull.pmask.qOrBitVal
10417// Or bit # BIT_IDX in bit set. No bounds checking
10418inline void fasttest::pmask_qOrBitVal(fasttest::SclDeltaNull& parent, u32 bit_idx, bool val) {
10419    u64 elem_idx = bit_idx >> 5;
10420    u64 shift = bit_idx & 31;
10421    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10422    elem = elem | (u32(val) << shift); // Or in val into elem
10423}
10424
10425// --- fasttest.SclDeltaNull.pmask.ClearBitsAll
10426// Set all bits of array to zero.
10427// Note: this does not change what NBits will return.
10428inline void fasttest::pmask_ClearBitsAll(fasttest::SclDeltaNull& parent) {
10429    u64 n = pmask_N(parent);
10430    for (u64 i = 0; i < n; i++) {
10431        pmask_qFind(parent, i) = 0;
10432    }
10433}
10434
10435// --- fasttest.SclDeltaNull.pmask.ClearBits
10436// Zero in PARENT any bits that are set in RHS.
10437inline void fasttest::pmask_ClearBits(fasttest::SclDeltaNull& parent, fasttest::SclDeltaNull &rhs) {
10438    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
10439    for (u64 i = 0; i < n; i++) {
10440        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
10441    }
10442}
10443
10444// --- fasttest.SclDeltaNull.pmask.OrBits
10445// Set PARENT to union of two bitsets.
10446// (This function is not named Set.. to avoid triple entendre).
10447inline void fasttest::pmask_OrBits(fasttest::SclDeltaNull& parent, fasttest::SclDeltaNull &rhs) {
10448    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
10449    for (u64 i = 0; i < n; i++) {
10450        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
10451    }
10452}
10453
10454// --- fasttest.SclDeltaNull.pmask.Sup
10455// Return smallest number N such that indexes of all 1 bits are below N
10456inline i32 fasttest::pmask_Sup(fasttest::SclDeltaNull& parent) {
10457    u64 lim = pmask_N(parent);
10458    i32 ret = 0;
10459    for (int i = lim-1; i >= 0; i--) {
10460        u32 &val = pmask_qFind(parent, i);
10461        if (val) {
10462            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
10463            ret = i * 32 + bitidx;
10464            break;
10465        }
10466    }
10467    return ret;
10468}
10469
10470// --- fasttest.SclDeltaNull.Value84.PresentQ
10471// Return true if the field is marked in the presence mask
10472inline bool fasttest::Value84_PresentQ(fasttest::SclDeltaNull& parent) {
10473    return pmask_qGetBit(parent, 0);
10474}
10475
10476// --- fasttest.SclDeltaNull.Value84.SetPresent
10477// Set presence bit for this field in the pmask
10478inline void fasttest::Value84_SetPresent(fasttest::SclDeltaNull& parent) {
10479    pmask_qSetBit(parent, 0); // mark presence in pmask
10480}
10481
10482// --- fasttest.SclDeltaNull.Value84.Present_GetBit
10483// Return field's bit number in the pmask
10484inline int fasttest::Value84_Present_GetBit(fasttest::SclDeltaNull& parent) {
10485    int retval = 0;
10486    (void)parent;//only to avoid -Wunused-parameter
10487    return retval;
10488}
10489
10490// --- fasttest.SclDeltaNull.Value84.Set
10491inline void fasttest::Value84_Set(fasttest::SclDeltaNull& parent, algo::Decimal rhs) {
10492    parent.Value84 = rhs;
10493    pmask_qSetBit(parent, 0); // mark presence in pmask
10494}
10495
10496// --- fasttest.SclDeltaNull.pmask_bitcurs.Reset
10497inline void fasttest::SclDeltaNull_pmask_bitcurs_Reset(SclDeltaNull_pmask_bitcurs &curs, fasttest::SclDeltaNull &parent) {
10498    curs.elems = &pmask_qFind(parent,0);
10499    curs.n_elems = pmask_N(parent);
10500    curs.bit = -1;
10501    SclDeltaNull_pmask_bitcurs_Next(curs);
10502}
10503
10504// --- fasttest.SclDeltaNull.pmask_bitcurs.ValidQ
10505// cursor points to valid item
10506inline bool fasttest::SclDeltaNull_pmask_bitcurs_ValidQ(SclDeltaNull_pmask_bitcurs &curs) {
10507    return curs.bit < curs.n_elems*32;
10508}
10509
10510// --- fasttest.SclDeltaNull.pmask_bitcurs.Access
10511// item access
10512inline int& fasttest::SclDeltaNull_pmask_bitcurs_Access(SclDeltaNull_pmask_bitcurs &curs) {
10513    return curs.bit;
10514}
10515
10516// --- fasttest.SclDeltaNull..GetMsgLength
10517// Message length (uses length field)
10518inline i32 fasttest::GetMsgLength(const fasttest::SclDeltaNull& parent) {
10519    return i32(const_cast<fasttest::SclDeltaNull&>(parent).length);
10520}
10521
10522// --- fasttest.SclDeltaNull..GetMsgMemptr
10523// Memptr encompassing the message (uses length field)
10524inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclDeltaNull& row) {
10525    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclDeltaNull&>(row).length));
10526}
10527
10528// --- fasttest.SclDeltaNull..Init
10529// Set all fields to initial values.
10530inline void fasttest::SclDeltaNull_Init(fasttest::SclDeltaNull& parent) {
10531    parent.length = u32(ssizeof(parent) + (0));
10532    parent.id = u32(84);
10533    parent.pmask = u32(0);
10534    parent.Value84 = algo::Decimal(algo::Decimal(0,0));
10535}
10536inline fasttest::SclDeltaOpt::SclDeltaOpt() {
10537    fasttest::SclDeltaOpt_Init(*this);
10538}
10539
10540
10541// --- fasttest.SclDeltaOpt.base.Castdown
10542// Check if fasttest::TemplateHeader is an instance of SclDeltaOpt by checking the type field
10543// If it is, return the pointer of target type.
10544// Additionally, check if the length field permits valid instance of SclDeltaOpt.
10545// If not successful, quietly return NULL.
10546inline fasttest::SclDeltaOpt* fasttest::SclDeltaOpt_Castdown(fasttest::TemplateHeader &hdr) {
10547    bool cond = hdr.id == (83);
10548    cond &= i32(hdr.length) >= ssizeof(fasttest::SclDeltaOpt);
10549    return cond ? reinterpret_cast<fasttest::SclDeltaOpt*>(&hdr) : NULL;
10550}
10551
10552// --- fasttest.SclDeltaOpt.base.Castbase
10553inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclDeltaOpt& parent) {
10554    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
10555}
10556
10557// --- fasttest.SclDeltaOpt.pmask.N
10558// Return constant 1
10559inline int fasttest::pmask_N(fasttest::SclDeltaOpt& parent) {
10560    (void)parent;
10561    return 1;
10562}
10563
10564// --- fasttest.SclDeltaOpt.pmask.qFind
10565// Access value
10566inline u32& fasttest::pmask_qFind(fasttest::SclDeltaOpt& parent, int) {
10567    return parent.pmask;
10568}
10569
10570// --- fasttest.SclDeltaOpt.pmask.NBits
10571// Get max # of bits in the bitset
10572// Return max. number of bits supported by array
10573inline int fasttest::pmask_Nbits(fasttest::SclDeltaOpt& parent) {
10574    return pmask_N(parent) * 32;
10575}
10576
10577// --- fasttest.SclDeltaOpt.pmask.qGetBit
10578// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
10579inline bool fasttest::pmask_qGetBit(fasttest::SclDeltaOpt& parent, u32 bit_idx) {
10580    u64 elem_idx = bit_idx >> 5;
10581    u64 shift = bit_idx & 31;
10582    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
10583    return bool((elem >> shift) & 1); // extract bit
10584}
10585
10586// --- fasttest.SclDeltaOpt.pmask.GetBit
10587// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
10588inline bool fasttest::pmask_GetBit(fasttest::SclDeltaOpt& parent, u32 bit_idx) {
10589    u64 elem_idx = bit_idx >> 5;
10590    u64 shift = bit_idx & 31;
10591    bool ret = false;
10592    u64 lim = pmask_N(parent);
10593    if (elem_idx < lim) {
10594        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
10595        ret = (elem >> shift) & 1;                 // extract bit
10596    }
10597    return ret;
10598}
10599
10600// --- fasttest.SclDeltaOpt.pmask.BitsEmptyQ
10601// Check if all the bits in the bitset are equal to zero
10602inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclDeltaOpt& parent) {
10603    bool retval = true;
10604    u64 n = pmask_N(parent);
10605    for (u64 i = 0; i < n; i++) {
10606        if (pmask_qFind(parent,i) != 0) {
10607            retval = false;
10608            break;
10609        }
10610    }
10611    return retval;
10612}
10613
10614// --- fasttest.SclDeltaOpt.pmask.Sum1s
10615inline u64 fasttest::pmask_Sum1s(fasttest::SclDeltaOpt& parent) {
10616    u64 sum = 0;
10617    u64 n = pmask_N(parent);
10618    for (u64 i = 0; i < n; i++) {
10619        sum += algo::u32_Count1s(pmask_qFind(parent, i));
10620    }
10621    return sum;
10622}
10623
10624// --- fasttest.SclDeltaOpt.pmask.qClearBit
10625// Clear bit # BIT_IDX in bit set. No bounds checking
10626inline void fasttest::pmask_qClearBit(fasttest::SclDeltaOpt& parent, u32 bit_idx) {
10627    u64 elem_idx = bit_idx >> 5;
10628    u64 shift = bit_idx & 31;
10629    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10630    elem = elem & ~(u32(1) << shift); // clear bit
10631}
10632
10633// --- fasttest.SclDeltaOpt.pmask.ClearBit
10634// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
10635inline void fasttest::pmask_ClearBit(fasttest::SclDeltaOpt& parent, u32 bit_idx) {
10636    u64 elem_idx = bit_idx >> 5;
10637    u64 shift = bit_idx & 31;
10638    u64 lim = pmask_N(parent);
10639    if (elem_idx < lim) {
10640        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10641        elem = elem & ~(u32(1) << shift); // clear bit
10642    }
10643}
10644
10645// --- fasttest.SclDeltaOpt.pmask.qSetBit
10646// Set bit # BIT_IDX in bit set. No bounds checking
10647inline void fasttest::pmask_qSetBit(fasttest::SclDeltaOpt& parent, u32 bit_idx) {
10648    u64 elem_idx = bit_idx >> 5;
10649    u64 shift = bit_idx & 31;
10650    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10651    elem = elem | (u32(1) << shift); // set bit
10652}
10653
10654// --- fasttest.SclDeltaOpt.pmask.SetBit
10655// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
10656inline void fasttest::pmask_SetBit(fasttest::SclDeltaOpt& parent, u32 bit_idx) {
10657    u64 elem_idx = bit_idx >> 5;
10658    u64 shift = bit_idx & 31;
10659    u64 lim = pmask_N(parent);
10660    if (elem_idx < lim) {
10661        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10662        elem = elem | (u32(1) << shift); // set bit
10663    }
10664}
10665
10666// --- fasttest.SclDeltaOpt.pmask.qSetBitVal
10667// Set bit # BIT_IDX in bit set. No bounds checking
10668inline void fasttest::pmask_qSetBitVal(fasttest::SclDeltaOpt& parent, u32 bit_idx, bool val) {
10669    u64 elem_idx = bit_idx >> 5;
10670    u64 shift = bit_idx & 31;
10671    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10672    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
10673}
10674
10675// --- fasttest.SclDeltaOpt.pmask.qOrBitVal
10676// Or bit # BIT_IDX in bit set. No bounds checking
10677inline void fasttest::pmask_qOrBitVal(fasttest::SclDeltaOpt& parent, u32 bit_idx, bool val) {
10678    u64 elem_idx = bit_idx >> 5;
10679    u64 shift = bit_idx & 31;
10680    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10681    elem = elem | (u32(val) << shift); // Or in val into elem
10682}
10683
10684// --- fasttest.SclDeltaOpt.pmask.ClearBitsAll
10685// Set all bits of array to zero.
10686// Note: this does not change what NBits will return.
10687inline void fasttest::pmask_ClearBitsAll(fasttest::SclDeltaOpt& parent) {
10688    u64 n = pmask_N(parent);
10689    for (u64 i = 0; i < n; i++) {
10690        pmask_qFind(parent, i) = 0;
10691    }
10692}
10693
10694// --- fasttest.SclDeltaOpt.pmask.ClearBits
10695// Zero in PARENT any bits that are set in RHS.
10696inline void fasttest::pmask_ClearBits(fasttest::SclDeltaOpt& parent, fasttest::SclDeltaOpt &rhs) {
10697    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
10698    for (u64 i = 0; i < n; i++) {
10699        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
10700    }
10701}
10702
10703// --- fasttest.SclDeltaOpt.pmask.OrBits
10704// Set PARENT to union of two bitsets.
10705// (This function is not named Set.. to avoid triple entendre).
10706inline void fasttest::pmask_OrBits(fasttest::SclDeltaOpt& parent, fasttest::SclDeltaOpt &rhs) {
10707    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
10708    for (u64 i = 0; i < n; i++) {
10709        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
10710    }
10711}
10712
10713// --- fasttest.SclDeltaOpt.pmask.Sup
10714// Return smallest number N such that indexes of all 1 bits are below N
10715inline i32 fasttest::pmask_Sup(fasttest::SclDeltaOpt& parent) {
10716    u64 lim = pmask_N(parent);
10717    i32 ret = 0;
10718    for (int i = lim-1; i >= 0; i--) {
10719        u32 &val = pmask_qFind(parent, i);
10720        if (val) {
10721            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
10722            ret = i * 32 + bitidx;
10723            break;
10724        }
10725    }
10726    return ret;
10727}
10728
10729// --- fasttest.SclDeltaOpt.Value83.PresentQ
10730// Return true if the field is marked in the presence mask
10731inline bool fasttest::Value83_PresentQ(fasttest::SclDeltaOpt& parent) {
10732    return pmask_qGetBit(parent, 0);
10733}
10734
10735// --- fasttest.SclDeltaOpt.Value83.SetPresent
10736// Set presence bit for this field in the pmask
10737inline void fasttest::Value83_SetPresent(fasttest::SclDeltaOpt& parent) {
10738    pmask_qSetBit(parent, 0); // mark presence in pmask
10739}
10740
10741// --- fasttest.SclDeltaOpt.Value83.Present_GetBit
10742// Return field's bit number in the pmask
10743inline int fasttest::Value83_Present_GetBit(fasttest::SclDeltaOpt& parent) {
10744    int retval = 0;
10745    (void)parent;//only to avoid -Wunused-parameter
10746    return retval;
10747}
10748
10749// --- fasttest.SclDeltaOpt.Value83.Set
10750inline void fasttest::Value83_Set(fasttest::SclDeltaOpt& parent, algo::Decimal rhs) {
10751    parent.Value83 = rhs;
10752    pmask_qSetBit(parent, 0); // mark presence in pmask
10753}
10754
10755// --- fasttest.SclDeltaOpt.pmask_bitcurs.Reset
10756inline void fasttest::SclDeltaOpt_pmask_bitcurs_Reset(SclDeltaOpt_pmask_bitcurs &curs, fasttest::SclDeltaOpt &parent) {
10757    curs.elems = &pmask_qFind(parent,0);
10758    curs.n_elems = pmask_N(parent);
10759    curs.bit = -1;
10760    SclDeltaOpt_pmask_bitcurs_Next(curs);
10761}
10762
10763// --- fasttest.SclDeltaOpt.pmask_bitcurs.ValidQ
10764// cursor points to valid item
10765inline bool fasttest::SclDeltaOpt_pmask_bitcurs_ValidQ(SclDeltaOpt_pmask_bitcurs &curs) {
10766    return curs.bit < curs.n_elems*32;
10767}
10768
10769// --- fasttest.SclDeltaOpt.pmask_bitcurs.Access
10770// item access
10771inline int& fasttest::SclDeltaOpt_pmask_bitcurs_Access(SclDeltaOpt_pmask_bitcurs &curs) {
10772    return curs.bit;
10773}
10774
10775// --- fasttest.SclDeltaOpt..GetMsgLength
10776// Message length (uses length field)
10777inline i32 fasttest::GetMsgLength(const fasttest::SclDeltaOpt& parent) {
10778    return i32(const_cast<fasttest::SclDeltaOpt&>(parent).length);
10779}
10780
10781// --- fasttest.SclDeltaOpt..GetMsgMemptr
10782// Memptr encompassing the message (uses length field)
10783inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclDeltaOpt& row) {
10784    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclDeltaOpt&>(row).length));
10785}
10786
10787// --- fasttest.SclDeltaOpt..Init
10788// Set all fields to initial values.
10789inline void fasttest::SclDeltaOpt_Init(fasttest::SclDeltaOpt& parent) {
10790    parent.length = u32(ssizeof(parent) + (0));
10791    parent.id = u32(83);
10792    parent.pmask = u32(0);
10793    parent.Value83 = algo::Decimal(algo::Decimal(1,-83));
10794}
10795inline fasttest::SclDflt::SclDflt() {
10796    fasttest::SclDflt_Init(*this);
10797}
10798
10799
10800// --- fasttest.SclDflt.base.Castdown
10801// Check if fasttest::TemplateHeader is an instance of SclDflt by checking the type field
10802// If it is, return the pointer of target type.
10803// Additionally, check if the length field permits valid instance of SclDflt.
10804// If not successful, quietly return NULL.
10805inline fasttest::SclDflt* fasttest::SclDflt_Castdown(fasttest::TemplateHeader &hdr) {
10806    bool cond = hdr.id == (45);
10807    cond &= i32(hdr.length) >= ssizeof(fasttest::SclDflt);
10808    return cond ? reinterpret_cast<fasttest::SclDflt*>(&hdr) : NULL;
10809}
10810
10811// --- fasttest.SclDflt.base.Castbase
10812inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclDflt& parent) {
10813    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
10814}
10815
10816// --- fasttest.SclDflt..GetMsgLength
10817// Message length (uses length field)
10818inline i32 fasttest::GetMsgLength(const fasttest::SclDflt& parent) {
10819    return i32(const_cast<fasttest::SclDflt&>(parent).length);
10820}
10821
10822// --- fasttest.SclDflt..GetMsgMemptr
10823// Memptr encompassing the message (uses length field)
10824inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclDflt& row) {
10825    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclDflt&>(row).length));
10826}
10827
10828// --- fasttest.SclDflt..Init
10829// Set all fields to initial values.
10830inline void fasttest::SclDflt_Init(fasttest::SclDflt& parent) {
10831    parent.length = u32(ssizeof(parent) + (0));
10832    parent.id = u32(45);
10833    parent.Value = algo::Decimal(algo::Decimal(-2,-45));
10834}
10835inline fasttest::SclDfltNull::SclDfltNull() {
10836    fasttest::SclDfltNull_Init(*this);
10837}
10838
10839
10840// --- fasttest.SclDfltNull.base.Castdown
10841// Check if fasttest::TemplateHeader is an instance of SclDfltNull by checking the type field
10842// If it is, return the pointer of target type.
10843// Additionally, check if the length field permits valid instance of SclDfltNull.
10844// If not successful, quietly return NULL.
10845inline fasttest::SclDfltNull* fasttest::SclDfltNull_Castdown(fasttest::TemplateHeader &hdr) {
10846    bool cond = hdr.id == (47);
10847    cond &= i32(hdr.length) >= ssizeof(fasttest::SclDfltNull);
10848    return cond ? reinterpret_cast<fasttest::SclDfltNull*>(&hdr) : NULL;
10849}
10850
10851// --- fasttest.SclDfltNull.base.Castbase
10852inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclDfltNull& parent) {
10853    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
10854}
10855
10856// --- fasttest.SclDfltNull.pmask.N
10857// Return constant 1
10858inline int fasttest::pmask_N(fasttest::SclDfltNull& parent) {
10859    (void)parent;
10860    return 1;
10861}
10862
10863// --- fasttest.SclDfltNull.pmask.qFind
10864// Access value
10865inline u32& fasttest::pmask_qFind(fasttest::SclDfltNull& parent, int) {
10866    return parent.pmask;
10867}
10868
10869// --- fasttest.SclDfltNull.pmask.NBits
10870// Get max # of bits in the bitset
10871// Return max. number of bits supported by array
10872inline int fasttest::pmask_Nbits(fasttest::SclDfltNull& parent) {
10873    return pmask_N(parent) * 32;
10874}
10875
10876// --- fasttest.SclDfltNull.pmask.qGetBit
10877// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
10878inline bool fasttest::pmask_qGetBit(fasttest::SclDfltNull& parent, u32 bit_idx) {
10879    u64 elem_idx = bit_idx >> 5;
10880    u64 shift = bit_idx & 31;
10881    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
10882    return bool((elem >> shift) & 1); // extract bit
10883}
10884
10885// --- fasttest.SclDfltNull.pmask.GetBit
10886// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
10887inline bool fasttest::pmask_GetBit(fasttest::SclDfltNull& parent, u32 bit_idx) {
10888    u64 elem_idx = bit_idx >> 5;
10889    u64 shift = bit_idx & 31;
10890    bool ret = false;
10891    u64 lim = pmask_N(parent);
10892    if (elem_idx < lim) {
10893        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
10894        ret = (elem >> shift) & 1;                 // extract bit
10895    }
10896    return ret;
10897}
10898
10899// --- fasttest.SclDfltNull.pmask.BitsEmptyQ
10900// Check if all the bits in the bitset are equal to zero
10901inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclDfltNull& parent) {
10902    bool retval = true;
10903    u64 n = pmask_N(parent);
10904    for (u64 i = 0; i < n; i++) {
10905        if (pmask_qFind(parent,i) != 0) {
10906            retval = false;
10907            break;
10908        }
10909    }
10910    return retval;
10911}
10912
10913// --- fasttest.SclDfltNull.pmask.Sum1s
10914inline u64 fasttest::pmask_Sum1s(fasttest::SclDfltNull& parent) {
10915    u64 sum = 0;
10916    u64 n = pmask_N(parent);
10917    for (u64 i = 0; i < n; i++) {
10918        sum += algo::u32_Count1s(pmask_qFind(parent, i));
10919    }
10920    return sum;
10921}
10922
10923// --- fasttest.SclDfltNull.pmask.qClearBit
10924// Clear bit # BIT_IDX in bit set. No bounds checking
10925inline void fasttest::pmask_qClearBit(fasttest::SclDfltNull& parent, u32 bit_idx) {
10926    u64 elem_idx = bit_idx >> 5;
10927    u64 shift = bit_idx & 31;
10928    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10929    elem = elem & ~(u32(1) << shift); // clear bit
10930}
10931
10932// --- fasttest.SclDfltNull.pmask.ClearBit
10933// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
10934inline void fasttest::pmask_ClearBit(fasttest::SclDfltNull& parent, u32 bit_idx) {
10935    u64 elem_idx = bit_idx >> 5;
10936    u64 shift = bit_idx & 31;
10937    u64 lim = pmask_N(parent);
10938    if (elem_idx < lim) {
10939        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10940        elem = elem & ~(u32(1) << shift); // clear bit
10941    }
10942}
10943
10944// --- fasttest.SclDfltNull.pmask.qSetBit
10945// Set bit # BIT_IDX in bit set. No bounds checking
10946inline void fasttest::pmask_qSetBit(fasttest::SclDfltNull& parent, u32 bit_idx) {
10947    u64 elem_idx = bit_idx >> 5;
10948    u64 shift = bit_idx & 31;
10949    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10950    elem = elem | (u32(1) << shift); // set bit
10951}
10952
10953// --- fasttest.SclDfltNull.pmask.SetBit
10954// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
10955inline void fasttest::pmask_SetBit(fasttest::SclDfltNull& parent, u32 bit_idx) {
10956    u64 elem_idx = bit_idx >> 5;
10957    u64 shift = bit_idx & 31;
10958    u64 lim = pmask_N(parent);
10959    if (elem_idx < lim) {
10960        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10961        elem = elem | (u32(1) << shift); // set bit
10962    }
10963}
10964
10965// --- fasttest.SclDfltNull.pmask.qSetBitVal
10966// Set bit # BIT_IDX in bit set. No bounds checking
10967inline void fasttest::pmask_qSetBitVal(fasttest::SclDfltNull& parent, u32 bit_idx, bool val) {
10968    u64 elem_idx = bit_idx >> 5;
10969    u64 shift = bit_idx & 31;
10970    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10971    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
10972}
10973
10974// --- fasttest.SclDfltNull.pmask.qOrBitVal
10975// Or bit # BIT_IDX in bit set. No bounds checking
10976inline void fasttest::pmask_qOrBitVal(fasttest::SclDfltNull& parent, u32 bit_idx, bool val) {
10977    u64 elem_idx = bit_idx >> 5;
10978    u64 shift = bit_idx & 31;
10979    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
10980    elem = elem | (u32(val) << shift); // Or in val into elem
10981}
10982
10983// --- fasttest.SclDfltNull.pmask.ClearBitsAll
10984// Set all bits of array to zero.
10985// Note: this does not change what NBits will return.
10986inline void fasttest::pmask_ClearBitsAll(fasttest::SclDfltNull& parent) {
10987    u64 n = pmask_N(parent);
10988    for (u64 i = 0; i < n; i++) {
10989        pmask_qFind(parent, i) = 0;
10990    }
10991}
10992
10993// --- fasttest.SclDfltNull.pmask.ClearBits
10994// Zero in PARENT any bits that are set in RHS.
10995inline void fasttest::pmask_ClearBits(fasttest::SclDfltNull& parent, fasttest::SclDfltNull &rhs) {
10996    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
10997    for (u64 i = 0; i < n; i++) {
10998        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
10999    }
11000}
11001
11002// --- fasttest.SclDfltNull.pmask.OrBits
11003// Set PARENT to union of two bitsets.
11004// (This function is not named Set.. to avoid triple entendre).
11005inline void fasttest::pmask_OrBits(fasttest::SclDfltNull& parent, fasttest::SclDfltNull &rhs) {
11006    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
11007    for (u64 i = 0; i < n; i++) {
11008        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
11009    }
11010}
11011
11012// --- fasttest.SclDfltNull.pmask.Sup
11013// Return smallest number N such that indexes of all 1 bits are below N
11014inline i32 fasttest::pmask_Sup(fasttest::SclDfltNull& parent) {
11015    u64 lim = pmask_N(parent);
11016    i32 ret = 0;
11017    for (int i = lim-1; i >= 0; i--) {
11018        u32 &val = pmask_qFind(parent, i);
11019        if (val) {
11020            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
11021            ret = i * 32 + bitidx;
11022            break;
11023        }
11024    }
11025    return ret;
11026}
11027
11028// --- fasttest.SclDfltNull.Value.PresentQ
11029// Return true if the field is marked in the presence mask
11030inline bool fasttest::Value_PresentQ(fasttest::SclDfltNull& parent) {
11031    return pmask_qGetBit(parent, 0);
11032}
11033
11034// --- fasttest.SclDfltNull.Value.SetPresent
11035// Set presence bit for this field in the pmask
11036inline void fasttest::Value_SetPresent(fasttest::SclDfltNull& parent) {
11037    pmask_qSetBit(parent, 0); // mark presence in pmask
11038}
11039
11040// --- fasttest.SclDfltNull.Value.Present_GetBit
11041// Return field's bit number in the pmask
11042inline int fasttest::Value_Present_GetBit(fasttest::SclDfltNull& parent) {
11043    int retval = 0;
11044    (void)parent;//only to avoid -Wunused-parameter
11045    return retval;
11046}
11047
11048// --- fasttest.SclDfltNull.Value.Set
11049inline void fasttest::Value_Set(fasttest::SclDfltNull& parent, algo::Decimal rhs) {
11050    parent.Value = rhs;
11051    pmask_qSetBit(parent, 0); // mark presence in pmask
11052}
11053
11054// --- fasttest.SclDfltNull.pmask_bitcurs.Reset
11055inline void fasttest::SclDfltNull_pmask_bitcurs_Reset(SclDfltNull_pmask_bitcurs &curs, fasttest::SclDfltNull &parent) {
11056    curs.elems = &pmask_qFind(parent,0);
11057    curs.n_elems = pmask_N(parent);
11058    curs.bit = -1;
11059    SclDfltNull_pmask_bitcurs_Next(curs);
11060}
11061
11062// --- fasttest.SclDfltNull.pmask_bitcurs.ValidQ
11063// cursor points to valid item
11064inline bool fasttest::SclDfltNull_pmask_bitcurs_ValidQ(SclDfltNull_pmask_bitcurs &curs) {
11065    return curs.bit < curs.n_elems*32;
11066}
11067
11068// --- fasttest.SclDfltNull.pmask_bitcurs.Access
11069// item access
11070inline int& fasttest::SclDfltNull_pmask_bitcurs_Access(SclDfltNull_pmask_bitcurs &curs) {
11071    return curs.bit;
11072}
11073
11074// --- fasttest.SclDfltNull..GetMsgLength
11075// Message length (uses length field)
11076inline i32 fasttest::GetMsgLength(const fasttest::SclDfltNull& parent) {
11077    return i32(const_cast<fasttest::SclDfltNull&>(parent).length);
11078}
11079
11080// --- fasttest.SclDfltNull..GetMsgMemptr
11081// Memptr encompassing the message (uses length field)
11082inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclDfltNull& row) {
11083    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclDfltNull&>(row).length));
11084}
11085
11086// --- fasttest.SclDfltNull..Init
11087// Set all fields to initial values.
11088inline void fasttest::SclDfltNull_Init(fasttest::SclDfltNull& parent) {
11089    parent.length = u32(ssizeof(parent) + (0));
11090    parent.id = u32(47);
11091    parent.pmask = u32(0);
11092    parent.Value = algo::Decimal(algo::Decimal(0,0));
11093}
11094inline fasttest::SclDfltOpt::SclDfltOpt() {
11095    fasttest::SclDfltOpt_Init(*this);
11096}
11097
11098
11099// --- fasttest.SclDfltOpt.base.Castdown
11100// Check if fasttest::TemplateHeader is an instance of SclDfltOpt by checking the type field
11101// If it is, return the pointer of target type.
11102// Additionally, check if the length field permits valid instance of SclDfltOpt.
11103// If not successful, quietly return NULL.
11104inline fasttest::SclDfltOpt* fasttest::SclDfltOpt_Castdown(fasttest::TemplateHeader &hdr) {
11105    bool cond = hdr.id == (46);
11106    cond &= i32(hdr.length) >= ssizeof(fasttest::SclDfltOpt);
11107    return cond ? reinterpret_cast<fasttest::SclDfltOpt*>(&hdr) : NULL;
11108}
11109
11110// --- fasttest.SclDfltOpt.base.Castbase
11111inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclDfltOpt& parent) {
11112    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11113}
11114
11115// --- fasttest.SclDfltOpt.pmask.N
11116// Return constant 1
11117inline int fasttest::pmask_N(fasttest::SclDfltOpt& parent) {
11118    (void)parent;
11119    return 1;
11120}
11121
11122// --- fasttest.SclDfltOpt.pmask.qFind
11123// Access value
11124inline u32& fasttest::pmask_qFind(fasttest::SclDfltOpt& parent, int) {
11125    return parent.pmask;
11126}
11127
11128// --- fasttest.SclDfltOpt.pmask.NBits
11129// Get max # of bits in the bitset
11130// Return max. number of bits supported by array
11131inline int fasttest::pmask_Nbits(fasttest::SclDfltOpt& parent) {
11132    return pmask_N(parent) * 32;
11133}
11134
11135// --- fasttest.SclDfltOpt.pmask.qGetBit
11136// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
11137inline bool fasttest::pmask_qGetBit(fasttest::SclDfltOpt& parent, u32 bit_idx) {
11138    u64 elem_idx = bit_idx >> 5;
11139    u64 shift = bit_idx & 31;
11140    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
11141    return bool((elem >> shift) & 1); // extract bit
11142}
11143
11144// --- fasttest.SclDfltOpt.pmask.GetBit
11145// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
11146inline bool fasttest::pmask_GetBit(fasttest::SclDfltOpt& parent, u32 bit_idx) {
11147    u64 elem_idx = bit_idx >> 5;
11148    u64 shift = bit_idx & 31;
11149    bool ret = false;
11150    u64 lim = pmask_N(parent);
11151    if (elem_idx < lim) {
11152        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
11153        ret = (elem >> shift) & 1;                 // extract bit
11154    }
11155    return ret;
11156}
11157
11158// --- fasttest.SclDfltOpt.pmask.BitsEmptyQ
11159// Check if all the bits in the bitset are equal to zero
11160inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclDfltOpt& parent) {
11161    bool retval = true;
11162    u64 n = pmask_N(parent);
11163    for (u64 i = 0; i < n; i++) {
11164        if (pmask_qFind(parent,i) != 0) {
11165            retval = false;
11166            break;
11167        }
11168    }
11169    return retval;
11170}
11171
11172// --- fasttest.SclDfltOpt.pmask.Sum1s
11173inline u64 fasttest::pmask_Sum1s(fasttest::SclDfltOpt& parent) {
11174    u64 sum = 0;
11175    u64 n = pmask_N(parent);
11176    for (u64 i = 0; i < n; i++) {
11177        sum += algo::u32_Count1s(pmask_qFind(parent, i));
11178    }
11179    return sum;
11180}
11181
11182// --- fasttest.SclDfltOpt.pmask.qClearBit
11183// Clear bit # BIT_IDX in bit set. No bounds checking
11184inline void fasttest::pmask_qClearBit(fasttest::SclDfltOpt& parent, u32 bit_idx) {
11185    u64 elem_idx = bit_idx >> 5;
11186    u64 shift = bit_idx & 31;
11187    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11188    elem = elem & ~(u32(1) << shift); // clear bit
11189}
11190
11191// --- fasttest.SclDfltOpt.pmask.ClearBit
11192// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
11193inline void fasttest::pmask_ClearBit(fasttest::SclDfltOpt& parent, u32 bit_idx) {
11194    u64 elem_idx = bit_idx >> 5;
11195    u64 shift = bit_idx & 31;
11196    u64 lim = pmask_N(parent);
11197    if (elem_idx < lim) {
11198        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11199        elem = elem & ~(u32(1) << shift); // clear bit
11200    }
11201}
11202
11203// --- fasttest.SclDfltOpt.pmask.qSetBit
11204// Set bit # BIT_IDX in bit set. No bounds checking
11205inline void fasttest::pmask_qSetBit(fasttest::SclDfltOpt& parent, u32 bit_idx) {
11206    u64 elem_idx = bit_idx >> 5;
11207    u64 shift = bit_idx & 31;
11208    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11209    elem = elem | (u32(1) << shift); // set bit
11210}
11211
11212// --- fasttest.SclDfltOpt.pmask.SetBit
11213// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
11214inline void fasttest::pmask_SetBit(fasttest::SclDfltOpt& parent, u32 bit_idx) {
11215    u64 elem_idx = bit_idx >> 5;
11216    u64 shift = bit_idx & 31;
11217    u64 lim = pmask_N(parent);
11218    if (elem_idx < lim) {
11219        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11220        elem = elem | (u32(1) << shift); // set bit
11221    }
11222}
11223
11224// --- fasttest.SclDfltOpt.pmask.qSetBitVal
11225// Set bit # BIT_IDX in bit set. No bounds checking
11226inline void fasttest::pmask_qSetBitVal(fasttest::SclDfltOpt& parent, u32 bit_idx, bool val) {
11227    u64 elem_idx = bit_idx >> 5;
11228    u64 shift = bit_idx & 31;
11229    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11230    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
11231}
11232
11233// --- fasttest.SclDfltOpt.pmask.qOrBitVal
11234// Or bit # BIT_IDX in bit set. No bounds checking
11235inline void fasttest::pmask_qOrBitVal(fasttest::SclDfltOpt& parent, u32 bit_idx, bool val) {
11236    u64 elem_idx = bit_idx >> 5;
11237    u64 shift = bit_idx & 31;
11238    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11239    elem = elem | (u32(val) << shift); // Or in val into elem
11240}
11241
11242// --- fasttest.SclDfltOpt.pmask.ClearBitsAll
11243// Set all bits of array to zero.
11244// Note: this does not change what NBits will return.
11245inline void fasttest::pmask_ClearBitsAll(fasttest::SclDfltOpt& parent) {
11246    u64 n = pmask_N(parent);
11247    for (u64 i = 0; i < n; i++) {
11248        pmask_qFind(parent, i) = 0;
11249    }
11250}
11251
11252// --- fasttest.SclDfltOpt.pmask.ClearBits
11253// Zero in PARENT any bits that are set in RHS.
11254inline void fasttest::pmask_ClearBits(fasttest::SclDfltOpt& parent, fasttest::SclDfltOpt &rhs) {
11255    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
11256    for (u64 i = 0; i < n; i++) {
11257        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
11258    }
11259}
11260
11261// --- fasttest.SclDfltOpt.pmask.OrBits
11262// Set PARENT to union of two bitsets.
11263// (This function is not named Set.. to avoid triple entendre).
11264inline void fasttest::pmask_OrBits(fasttest::SclDfltOpt& parent, fasttest::SclDfltOpt &rhs) {
11265    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
11266    for (u64 i = 0; i < n; i++) {
11267        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
11268    }
11269}
11270
11271// --- fasttest.SclDfltOpt.pmask.Sup
11272// Return smallest number N such that indexes of all 1 bits are below N
11273inline i32 fasttest::pmask_Sup(fasttest::SclDfltOpt& parent) {
11274    u64 lim = pmask_N(parent);
11275    i32 ret = 0;
11276    for (int i = lim-1; i >= 0; i--) {
11277        u32 &val = pmask_qFind(parent, i);
11278        if (val) {
11279            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
11280            ret = i * 32 + bitidx;
11281            break;
11282        }
11283    }
11284    return ret;
11285}
11286
11287// --- fasttest.SclDfltOpt.Value.PresentQ
11288// Return true if the field is marked in the presence mask
11289inline bool fasttest::Value_PresentQ(fasttest::SclDfltOpt& parent) {
11290    return pmask_qGetBit(parent, 0);
11291}
11292
11293// --- fasttest.SclDfltOpt.Value.SetPresent
11294// Set presence bit for this field in the pmask
11295inline void fasttest::Value_SetPresent(fasttest::SclDfltOpt& parent) {
11296    pmask_qSetBit(parent, 0); // mark presence in pmask
11297}
11298
11299// --- fasttest.SclDfltOpt.Value.Present_GetBit
11300// Return field's bit number in the pmask
11301inline int fasttest::Value_Present_GetBit(fasttest::SclDfltOpt& parent) {
11302    int retval = 0;
11303    (void)parent;//only to avoid -Wunused-parameter
11304    return retval;
11305}
11306
11307// --- fasttest.SclDfltOpt.Value.Set
11308inline void fasttest::Value_Set(fasttest::SclDfltOpt& parent, algo::Decimal rhs) {
11309    parent.Value = rhs;
11310    pmask_qSetBit(parent, 0); // mark presence in pmask
11311}
11312
11313// --- fasttest.SclDfltOpt.pmask_bitcurs.Reset
11314inline void fasttest::SclDfltOpt_pmask_bitcurs_Reset(SclDfltOpt_pmask_bitcurs &curs, fasttest::SclDfltOpt &parent) {
11315    curs.elems = &pmask_qFind(parent,0);
11316    curs.n_elems = pmask_N(parent);
11317    curs.bit = -1;
11318    SclDfltOpt_pmask_bitcurs_Next(curs);
11319}
11320
11321// --- fasttest.SclDfltOpt.pmask_bitcurs.ValidQ
11322// cursor points to valid item
11323inline bool fasttest::SclDfltOpt_pmask_bitcurs_ValidQ(SclDfltOpt_pmask_bitcurs &curs) {
11324    return curs.bit < curs.n_elems*32;
11325}
11326
11327// --- fasttest.SclDfltOpt.pmask_bitcurs.Access
11328// item access
11329inline int& fasttest::SclDfltOpt_pmask_bitcurs_Access(SclDfltOpt_pmask_bitcurs &curs) {
11330    return curs.bit;
11331}
11332
11333// --- fasttest.SclDfltOpt..GetMsgLength
11334// Message length (uses length field)
11335inline i32 fasttest::GetMsgLength(const fasttest::SclDfltOpt& parent) {
11336    return i32(const_cast<fasttest::SclDfltOpt&>(parent).length);
11337}
11338
11339// --- fasttest.SclDfltOpt..GetMsgMemptr
11340// Memptr encompassing the message (uses length field)
11341inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclDfltOpt& row) {
11342    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclDfltOpt&>(row).length));
11343}
11344
11345// --- fasttest.SclDfltOpt..Init
11346// Set all fields to initial values.
11347inline void fasttest::SclDfltOpt_Init(fasttest::SclDfltOpt& parent) {
11348    parent.length = u32(ssizeof(parent) + (0));
11349    parent.id = u32(46);
11350    parent.pmask = u32(0);
11351    parent.Value = algo::Decimal(algo::Decimal(1,-46));
11352}
11353inline fasttest::SclNone::SclNone() {
11354    fasttest::SclNone_Init(*this);
11355}
11356
11357
11358// --- fasttest.SclNone.base.Castdown
11359// Check if fasttest::TemplateHeader is an instance of SclNone by checking the type field
11360// If it is, return the pointer of target type.
11361// Additionally, check if the length field permits valid instance of SclNone.
11362// If not successful, quietly return NULL.
11363inline fasttest::SclNone* fasttest::SclNone_Castdown(fasttest::TemplateHeader &hdr) {
11364    bool cond = hdr.id == (9);
11365    cond &= i32(hdr.length) >= ssizeof(fasttest::SclNone);
11366    return cond ? reinterpret_cast<fasttest::SclNone*>(&hdr) : NULL;
11367}
11368
11369// --- fasttest.SclNone.base.Castbase
11370inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclNone& parent) {
11371    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11372}
11373
11374// --- fasttest.SclNone..GetMsgLength
11375// Message length (uses length field)
11376inline i32 fasttest::GetMsgLength(const fasttest::SclNone& parent) {
11377    return i32(const_cast<fasttest::SclNone&>(parent).length);
11378}
11379
11380// --- fasttest.SclNone..GetMsgMemptr
11381// Memptr encompassing the message (uses length field)
11382inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclNone& row) {
11383    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclNone&>(row).length));
11384}
11385
11386// --- fasttest.SclNone..Init
11387// Set all fields to initial values.
11388inline void fasttest::SclNone_Init(fasttest::SclNone& parent) {
11389    parent.length = u32(ssizeof(parent) + (0));
11390    parent.id = u32(9);
11391    parent.Value = algo::Decimal(algo::Decimal(0,0));
11392}
11393inline fasttest::SclNoneOpt::SclNoneOpt() {
11394    fasttest::SclNoneOpt_Init(*this);
11395}
11396
11397
11398// --- fasttest.SclNoneOpt.base.Castdown
11399// Check if fasttest::TemplateHeader is an instance of SclNoneOpt by checking the type field
11400// If it is, return the pointer of target type.
11401// Additionally, check if the length field permits valid instance of SclNoneOpt.
11402// If not successful, quietly return NULL.
11403inline fasttest::SclNoneOpt* fasttest::SclNoneOpt_Castdown(fasttest::TemplateHeader &hdr) {
11404    bool cond = hdr.id == (10);
11405    cond &= i32(hdr.length) >= ssizeof(fasttest::SclNoneOpt);
11406    return cond ? reinterpret_cast<fasttest::SclNoneOpt*>(&hdr) : NULL;
11407}
11408
11409// --- fasttest.SclNoneOpt.base.Castbase
11410inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SclNoneOpt& parent) {
11411    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11412}
11413
11414// --- fasttest.SclNoneOpt.pmask.N
11415// Return constant 1
11416inline int fasttest::pmask_N(fasttest::SclNoneOpt& parent) {
11417    (void)parent;
11418    return 1;
11419}
11420
11421// --- fasttest.SclNoneOpt.pmask.qFind
11422// Access value
11423inline u32& fasttest::pmask_qFind(fasttest::SclNoneOpt& parent, int) {
11424    return parent.pmask;
11425}
11426
11427// --- fasttest.SclNoneOpt.pmask.NBits
11428// Get max # of bits in the bitset
11429// Return max. number of bits supported by array
11430inline int fasttest::pmask_Nbits(fasttest::SclNoneOpt& parent) {
11431    return pmask_N(parent) * 32;
11432}
11433
11434// --- fasttest.SclNoneOpt.pmask.qGetBit
11435// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
11436inline bool fasttest::pmask_qGetBit(fasttest::SclNoneOpt& parent, u32 bit_idx) {
11437    u64 elem_idx = bit_idx >> 5;
11438    u64 shift = bit_idx & 31;
11439    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
11440    return bool((elem >> shift) & 1); // extract bit
11441}
11442
11443// --- fasttest.SclNoneOpt.pmask.GetBit
11444// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
11445inline bool fasttest::pmask_GetBit(fasttest::SclNoneOpt& parent, u32 bit_idx) {
11446    u64 elem_idx = bit_idx >> 5;
11447    u64 shift = bit_idx & 31;
11448    bool ret = false;
11449    u64 lim = pmask_N(parent);
11450    if (elem_idx < lim) {
11451        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
11452        ret = (elem >> shift) & 1;                 // extract bit
11453    }
11454    return ret;
11455}
11456
11457// --- fasttest.SclNoneOpt.pmask.BitsEmptyQ
11458// Check if all the bits in the bitset are equal to zero
11459inline bool fasttest::pmask_BitsEmptyQ(fasttest::SclNoneOpt& parent) {
11460    bool retval = true;
11461    u64 n = pmask_N(parent);
11462    for (u64 i = 0; i < n; i++) {
11463        if (pmask_qFind(parent,i) != 0) {
11464            retval = false;
11465            break;
11466        }
11467    }
11468    return retval;
11469}
11470
11471// --- fasttest.SclNoneOpt.pmask.Sum1s
11472inline u64 fasttest::pmask_Sum1s(fasttest::SclNoneOpt& parent) {
11473    u64 sum = 0;
11474    u64 n = pmask_N(parent);
11475    for (u64 i = 0; i < n; i++) {
11476        sum += algo::u32_Count1s(pmask_qFind(parent, i));
11477    }
11478    return sum;
11479}
11480
11481// --- fasttest.SclNoneOpt.pmask.qClearBit
11482// Clear bit # BIT_IDX in bit set. No bounds checking
11483inline void fasttest::pmask_qClearBit(fasttest::SclNoneOpt& parent, u32 bit_idx) {
11484    u64 elem_idx = bit_idx >> 5;
11485    u64 shift = bit_idx & 31;
11486    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11487    elem = elem & ~(u32(1) << shift); // clear bit
11488}
11489
11490// --- fasttest.SclNoneOpt.pmask.ClearBit
11491// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
11492inline void fasttest::pmask_ClearBit(fasttest::SclNoneOpt& parent, u32 bit_idx) {
11493    u64 elem_idx = bit_idx >> 5;
11494    u64 shift = bit_idx & 31;
11495    u64 lim = pmask_N(parent);
11496    if (elem_idx < lim) {
11497        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11498        elem = elem & ~(u32(1) << shift); // clear bit
11499    }
11500}
11501
11502// --- fasttest.SclNoneOpt.pmask.qSetBit
11503// Set bit # BIT_IDX in bit set. No bounds checking
11504inline void fasttest::pmask_qSetBit(fasttest::SclNoneOpt& parent, u32 bit_idx) {
11505    u64 elem_idx = bit_idx >> 5;
11506    u64 shift = bit_idx & 31;
11507    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11508    elem = elem | (u32(1) << shift); // set bit
11509}
11510
11511// --- fasttest.SclNoneOpt.pmask.SetBit
11512// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
11513inline void fasttest::pmask_SetBit(fasttest::SclNoneOpt& parent, u32 bit_idx) {
11514    u64 elem_idx = bit_idx >> 5;
11515    u64 shift = bit_idx & 31;
11516    u64 lim = pmask_N(parent);
11517    if (elem_idx < lim) {
11518        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11519        elem = elem | (u32(1) << shift); // set bit
11520    }
11521}
11522
11523// --- fasttest.SclNoneOpt.pmask.qSetBitVal
11524// Set bit # BIT_IDX in bit set. No bounds checking
11525inline void fasttest::pmask_qSetBitVal(fasttest::SclNoneOpt& parent, u32 bit_idx, bool val) {
11526    u64 elem_idx = bit_idx >> 5;
11527    u64 shift = bit_idx & 31;
11528    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11529    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
11530}
11531
11532// --- fasttest.SclNoneOpt.pmask.qOrBitVal
11533// Or bit # BIT_IDX in bit set. No bounds checking
11534inline void fasttest::pmask_qOrBitVal(fasttest::SclNoneOpt& parent, u32 bit_idx, bool val) {
11535    u64 elem_idx = bit_idx >> 5;
11536    u64 shift = bit_idx & 31;
11537    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
11538    elem = elem | (u32(val) << shift); // Or in val into elem
11539}
11540
11541// --- fasttest.SclNoneOpt.pmask.ClearBitsAll
11542// Set all bits of array to zero.
11543// Note: this does not change what NBits will return.
11544inline void fasttest::pmask_ClearBitsAll(fasttest::SclNoneOpt& parent) {
11545    u64 n = pmask_N(parent);
11546    for (u64 i = 0; i < n; i++) {
11547        pmask_qFind(parent, i) = 0;
11548    }
11549}
11550
11551// --- fasttest.SclNoneOpt.pmask.ClearBits
11552// Zero in PARENT any bits that are set in RHS.
11553inline void fasttest::pmask_ClearBits(fasttest::SclNoneOpt& parent, fasttest::SclNoneOpt &rhs) {
11554    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
11555    for (u64 i = 0; i < n; i++) {
11556        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
11557    }
11558}
11559
11560// --- fasttest.SclNoneOpt.pmask.OrBits
11561// Set PARENT to union of two bitsets.
11562// (This function is not named Set.. to avoid triple entendre).
11563inline void fasttest::pmask_OrBits(fasttest::SclNoneOpt& parent, fasttest::SclNoneOpt &rhs) {
11564    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
11565    for (u64 i = 0; i < n; i++) {
11566        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
11567    }
11568}
11569
11570// --- fasttest.SclNoneOpt.pmask.Sup
11571// Return smallest number N such that indexes of all 1 bits are below N
11572inline i32 fasttest::pmask_Sup(fasttest::SclNoneOpt& parent) {
11573    u64 lim = pmask_N(parent);
11574    i32 ret = 0;
11575    for (int i = lim-1; i >= 0; i--) {
11576        u32 &val = pmask_qFind(parent, i);
11577        if (val) {
11578            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
11579            ret = i * 32 + bitidx;
11580            break;
11581        }
11582    }
11583    return ret;
11584}
11585
11586// --- fasttest.SclNoneOpt.Value.PresentQ
11587// Return true if the field is marked in the presence mask
11588inline bool fasttest::Value_PresentQ(fasttest::SclNoneOpt& parent) {
11589    return pmask_qGetBit(parent, 0);
11590}
11591
11592// --- fasttest.SclNoneOpt.Value.SetPresent
11593// Set presence bit for this field in the pmask
11594inline void fasttest::Value_SetPresent(fasttest::SclNoneOpt& parent) {
11595    pmask_qSetBit(parent, 0); // mark presence in pmask
11596}
11597
11598// --- fasttest.SclNoneOpt.Value.Present_GetBit
11599// Return field's bit number in the pmask
11600inline int fasttest::Value_Present_GetBit(fasttest::SclNoneOpt& parent) {
11601    int retval = 0;
11602    (void)parent;//only to avoid -Wunused-parameter
11603    return retval;
11604}
11605
11606// --- fasttest.SclNoneOpt.Value.Set
11607inline void fasttest::Value_Set(fasttest::SclNoneOpt& parent, algo::Decimal rhs) {
11608    parent.Value = rhs;
11609    pmask_qSetBit(parent, 0); // mark presence in pmask
11610}
11611
11612// --- fasttest.SclNoneOpt.pmask_bitcurs.Reset
11613inline void fasttest::SclNoneOpt_pmask_bitcurs_Reset(SclNoneOpt_pmask_bitcurs &curs, fasttest::SclNoneOpt &parent) {
11614    curs.elems = &pmask_qFind(parent,0);
11615    curs.n_elems = pmask_N(parent);
11616    curs.bit = -1;
11617    SclNoneOpt_pmask_bitcurs_Next(curs);
11618}
11619
11620// --- fasttest.SclNoneOpt.pmask_bitcurs.ValidQ
11621// cursor points to valid item
11622inline bool fasttest::SclNoneOpt_pmask_bitcurs_ValidQ(SclNoneOpt_pmask_bitcurs &curs) {
11623    return curs.bit < curs.n_elems*32;
11624}
11625
11626// --- fasttest.SclNoneOpt.pmask_bitcurs.Access
11627// item access
11628inline int& fasttest::SclNoneOpt_pmask_bitcurs_Access(SclNoneOpt_pmask_bitcurs &curs) {
11629    return curs.bit;
11630}
11631
11632// --- fasttest.SclNoneOpt..GetMsgLength
11633// Message length (uses length field)
11634inline i32 fasttest::GetMsgLength(const fasttest::SclNoneOpt& parent) {
11635    return i32(const_cast<fasttest::SclNoneOpt&>(parent).length);
11636}
11637
11638// --- fasttest.SclNoneOpt..GetMsgMemptr
11639// Memptr encompassing the message (uses length field)
11640inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SclNoneOpt& row) {
11641    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SclNoneOpt&>(row).length));
11642}
11643
11644// --- fasttest.SclNoneOpt..Init
11645// Set all fields to initial values.
11646inline void fasttest::SclNoneOpt_Init(fasttest::SclNoneOpt& parent) {
11647    parent.length = u32(ssizeof(parent) + (0));
11648    parent.id = u32(10);
11649    parent.pmask = u32(0);
11650    parent.Value = algo::Decimal(algo::Decimal(0,0));
11651}
11652inline fasttest::SecondSeq::SecondSeq() {
11653    fasttest::SecondSeq_Init(*this);
11654}
11655
11656
11657// --- fasttest.SecondSeq..Init
11658// Set all fields to initial values.
11659inline void fasttest::SecondSeq_Init(fasttest::SecondSeq& parent) {
11660    parent.Value2 = u32(0);
11661}
11662inline fasttest::SeqOrder::SeqOrder() {
11663    fasttest::SeqOrder_Init(*this);
11664}
11665
11666
11667// --- fasttest.SeqOrder.base.Castdown
11668// Check if fasttest::TemplateHeader is an instance of SeqOrder by checking the type field
11669// If it is, return the pointer of target type.
11670// Additionally, check if the length field permits valid instance of SeqOrder.
11671// If not successful, quietly return NULL.
11672inline fasttest::SeqOrder* fasttest::SeqOrder_Castdown(fasttest::TemplateHeader &hdr) {
11673    bool cond = hdr.id == (135);
11674    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqOrder);
11675    return cond ? reinterpret_cast<fasttest::SeqOrder*>(&hdr) : NULL;
11676}
11677
11678// --- fasttest.SeqOrder.base.Castbase
11679inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqOrder& parent) {
11680    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11681}
11682
11683// --- fasttest.SeqOrder.FirstSeq.N
11684// Return number of elements in varlen field
11685inline u32 fasttest::FirstSeq_N(const fasttest::SeqOrder& parent) {
11686    u32 length = i32(((fasttest::SeqOrder&)parent).length);
11687    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqOrder)) - sizeof(fasttest::SeqOrder); // avoid unsigned subtraction underflow
11688    return u32(extra_bytes / sizeof(fasttest::FirstSeq));
11689}
11690
11691// --- fasttest.SeqOrder.FirstSeq_curs.Reset
11692inline void fasttest::SeqOrder_FirstSeq_curs_Reset(SeqOrder_FirstSeq_curs &curs, fasttest::SeqOrder &parent) {
11693    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqOrder);
11694    curs.length = i32(parent.length) - sizeof(fasttest::SeqOrder);
11695    curs.index = 0;
11696}
11697
11698// --- fasttest.SeqOrder.FirstSeq_curs.ValidQ
11699// cursor points to valid item
11700inline bool fasttest::SeqOrder_FirstSeq_curs_ValidQ(SeqOrder_FirstSeq_curs &curs) {
11701    bool valid = ssizeof(fasttest::FirstSeq) <= curs.length;
11702    return valid;
11703}
11704
11705// --- fasttest.SeqOrder.FirstSeq_curs.Next
11706// proceed to next item
11707inline void fasttest::SeqOrder_FirstSeq_curs_Next(SeqOrder_FirstSeq_curs &curs) {
11708    i32 len = i32(sizeof(fasttest::FirstSeq));
11709    curs.ptr += len;
11710    curs.length -= len;
11711    ++curs.index;
11712}
11713
11714// --- fasttest.SeqOrder.FirstSeq_curs.Access
11715// item access
11716inline fasttest::FirstSeq& fasttest::SeqOrder_FirstSeq_curs_Access(SeqOrder_FirstSeq_curs &curs) {
11717    return *(fasttest::FirstSeq*)curs.ptr;
11718}
11719
11720// --- fasttest.SeqOrder..GetMsgLength
11721// Message length (uses length field)
11722inline i32 fasttest::GetMsgLength(const fasttest::SeqOrder& parent) {
11723    return i32(const_cast<fasttest::SeqOrder&>(parent).length);
11724}
11725
11726// --- fasttest.SeqOrder..GetMsgMemptr
11727// Memptr encompassing the message (uses length field)
11728inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqOrder& row) {
11729    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqOrder&>(row).length));
11730}
11731
11732// --- fasttest.SeqOrder..Init
11733// Set all fields to initial values.
11734inline void fasttest::SeqOrder_Init(fasttest::SeqOrder& parent) {
11735    parent.length = u32(ssizeof(parent) + (0));
11736    parent.id = u32(135);
11737    parent.Value3 = u32(0);
11738}
11739inline fasttest::SeqSgmOpt::SeqSgmOpt() {
11740    fasttest::SeqSgmOpt_Init(*this);
11741}
11742
11743
11744// --- fasttest.SeqSgmOpt.base.Castdown
11745// Check if fasttest::TemplateHeader is an instance of SeqSgmOpt by checking the type field
11746// If it is, return the pointer of target type.
11747// Additionally, check if the length field permits valid instance of SeqSgmOpt.
11748// If not successful, quietly return NULL.
11749inline fasttest::SeqSgmOpt* fasttest::SeqSgmOpt_Castdown(fasttest::TemplateHeader &hdr) {
11750    bool cond = hdr.id == (118);
11751    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqSgmOpt);
11752    return cond ? reinterpret_cast<fasttest::SeqSgmOpt*>(&hdr) : NULL;
11753}
11754
11755// --- fasttest.SeqSgmOpt.base.Castbase
11756inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqSgmOpt& parent) {
11757    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11758}
11759
11760// --- fasttest.SeqSgmOpt.OptSgmSeq.N
11761// Return number of elements in varlen field
11762inline u32 fasttest::OptSgmSeq_N(const fasttest::SeqSgmOpt& parent) {
11763    u32 length = i32(((fasttest::SeqSgmOpt&)parent).length);
11764    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqSgmOpt)) - sizeof(fasttest::SeqSgmOpt); // avoid unsigned subtraction underflow
11765    return u32(extra_bytes / sizeof(fasttest::OptSgmSeq));
11766}
11767
11768// --- fasttest.SeqSgmOpt.OptSgmSeq_curs.Reset
11769inline void fasttest::SeqSgmOpt_OptSgmSeq_curs_Reset(SeqSgmOpt_OptSgmSeq_curs &curs, fasttest::SeqSgmOpt &parent) {
11770    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqSgmOpt);
11771    curs.length = i32(parent.length) - sizeof(fasttest::SeqSgmOpt);
11772    curs.index = 0;
11773}
11774
11775// --- fasttest.SeqSgmOpt.OptSgmSeq_curs.ValidQ
11776// cursor points to valid item
11777inline bool fasttest::SeqSgmOpt_OptSgmSeq_curs_ValidQ(SeqSgmOpt_OptSgmSeq_curs &curs) {
11778    bool valid = ssizeof(fasttest::OptSgmSeq) <= curs.length;
11779    return valid;
11780}
11781
11782// --- fasttest.SeqSgmOpt.OptSgmSeq_curs.Next
11783// proceed to next item
11784inline void fasttest::SeqSgmOpt_OptSgmSeq_curs_Next(SeqSgmOpt_OptSgmSeq_curs &curs) {
11785    i32 len = i32(sizeof(fasttest::OptSgmSeq));
11786    curs.ptr += len;
11787    curs.length -= len;
11788    ++curs.index;
11789}
11790
11791// --- fasttest.SeqSgmOpt.OptSgmSeq_curs.Access
11792// item access
11793inline fasttest::OptSgmSeq& fasttest::SeqSgmOpt_OptSgmSeq_curs_Access(SeqSgmOpt_OptSgmSeq_curs &curs) {
11794    return *(fasttest::OptSgmSeq*)curs.ptr;
11795}
11796
11797// --- fasttest.SeqSgmOpt..GetMsgLength
11798// Message length (uses length field)
11799inline i32 fasttest::GetMsgLength(const fasttest::SeqSgmOpt& parent) {
11800    return i32(const_cast<fasttest::SeqSgmOpt&>(parent).length);
11801}
11802
11803// --- fasttest.SeqSgmOpt..GetMsgMemptr
11804// Memptr encompassing the message (uses length field)
11805inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqSgmOpt& row) {
11806    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqSgmOpt&>(row).length));
11807}
11808
11809// --- fasttest.SeqSgmOpt..Init
11810// Set all fields to initial values.
11811inline void fasttest::SeqSgmOpt_Init(fasttest::SeqSgmOpt& parent) {
11812    parent.length = u32(ssizeof(parent) + (0));
11813    parent.id = u32(118);
11814}
11815inline fasttest::TrvSeq::TrvSeq() {
11816    fasttest::TrvSeq_Init(*this);
11817}
11818
11819
11820// --- fasttest.TrvSeq..Init
11821// Set all fields to initial values.
11822inline void fasttest::TrvSeq_Init(fasttest::TrvSeq& TrvSeq) {
11823    TrvSeq.Value = u32(0);
11824}
11825inline fasttest::SeqTrv::SeqTrv() {
11826    fasttest::SeqTrv_Init(*this);
11827}
11828
11829
11830// --- fasttest.SeqTrv.base.Castdown
11831// Check if fasttest::TemplateHeader is an instance of SeqTrv by checking the type field
11832// If it is, return the pointer of target type.
11833// Additionally, check if the length field permits valid instance of SeqTrv.
11834// If not successful, quietly return NULL.
11835inline fasttest::SeqTrv* fasttest::SeqTrv_Castdown(fasttest::TemplateHeader &hdr) {
11836    bool cond = hdr.id == (116);
11837    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrv);
11838    return cond ? reinterpret_cast<fasttest::SeqTrv*>(&hdr) : NULL;
11839}
11840
11841// --- fasttest.SeqTrv.base.Castbase
11842inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrv& parent) {
11843    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11844}
11845
11846// --- fasttest.SeqTrv.TrvSeq.N
11847// Return number of elements in varlen field
11848inline u32 fasttest::TrvSeq_N(const fasttest::SeqTrv& parent) {
11849    u32 length = i32(((fasttest::SeqTrv&)parent).length);
11850    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqTrv)) - sizeof(fasttest::SeqTrv); // avoid unsigned subtraction underflow
11851    return u32(extra_bytes / sizeof(fasttest::TrvSeq));
11852}
11853
11854// --- fasttest.SeqTrv.TrvSeq_curs.Reset
11855inline void fasttest::SeqTrv_TrvSeq_curs_Reset(SeqTrv_TrvSeq_curs &curs, fasttest::SeqTrv &parent) {
11856    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqTrv);
11857    curs.length = i32(parent.length) - sizeof(fasttest::SeqTrv);
11858    curs.index = 0;
11859}
11860
11861// --- fasttest.SeqTrv.TrvSeq_curs.ValidQ
11862// cursor points to valid item
11863inline bool fasttest::SeqTrv_TrvSeq_curs_ValidQ(SeqTrv_TrvSeq_curs &curs) {
11864    bool valid = ssizeof(fasttest::TrvSeq) <= curs.length;
11865    return valid;
11866}
11867
11868// --- fasttest.SeqTrv.TrvSeq_curs.Next
11869// proceed to next item
11870inline void fasttest::SeqTrv_TrvSeq_curs_Next(SeqTrv_TrvSeq_curs &curs) {
11871    i32 len = i32(sizeof(fasttest::TrvSeq));
11872    curs.ptr += len;
11873    curs.length -= len;
11874    ++curs.index;
11875}
11876
11877// --- fasttest.SeqTrv.TrvSeq_curs.Access
11878// item access
11879inline fasttest::TrvSeq& fasttest::SeqTrv_TrvSeq_curs_Access(SeqTrv_TrvSeq_curs &curs) {
11880    return *(fasttest::TrvSeq*)curs.ptr;
11881}
11882
11883// --- fasttest.SeqTrv..GetMsgLength
11884// Message length (uses length field)
11885inline i32 fasttest::GetMsgLength(const fasttest::SeqTrv& parent) {
11886    return i32(const_cast<fasttest::SeqTrv&>(parent).length);
11887}
11888
11889// --- fasttest.SeqTrv..GetMsgMemptr
11890// Memptr encompassing the message (uses length field)
11891inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrv& row) {
11892    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrv&>(row).length));
11893}
11894
11895// --- fasttest.SeqTrv..Init
11896// Set all fields to initial values.
11897inline void fasttest::SeqTrv_Init(fasttest::SeqTrv& parent) {
11898    parent.length = u32(ssizeof(parent) + (0));
11899    parent.id = u32(116);
11900}
11901inline fasttest::TrvSeqLenConst::TrvSeqLenConst() {
11902    fasttest::TrvSeqLenConst_Init(*this);
11903}
11904
11905
11906// --- fasttest.TrvSeqLenConst..Init
11907// Set all fields to initial values.
11908inline void fasttest::TrvSeqLenConst_Init(fasttest::TrvSeqLenConst& parent) {
11909    parent.Value = u32(0);
11910}
11911inline fasttest::SeqTrvLenConst::SeqTrvLenConst() {
11912    fasttest::SeqTrvLenConst_Init(*this);
11913}
11914
11915
11916// --- fasttest.SeqTrvLenConst.base.Castdown
11917// Check if fasttest::TemplateHeader is an instance of SeqTrvLenConst by checking the type field
11918// If it is, return the pointer of target type.
11919// Additionally, check if the length field permits valid instance of SeqTrvLenConst.
11920// If not successful, quietly return NULL.
11921inline fasttest::SeqTrvLenConst* fasttest::SeqTrvLenConst_Castdown(fasttest::TemplateHeader &hdr) {
11922    bool cond = hdr.id == (131);
11923    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrvLenConst);
11924    return cond ? reinterpret_cast<fasttest::SeqTrvLenConst*>(&hdr) : NULL;
11925}
11926
11927// --- fasttest.SeqTrvLenConst.base.Castbase
11928inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrvLenConst& parent) {
11929    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11930}
11931
11932// --- fasttest.SeqTrvLenConst..GetMsgLength
11933// Message length (uses length field)
11934inline i32 fasttest::GetMsgLength(const fasttest::SeqTrvLenConst& parent) {
11935    return i32(const_cast<fasttest::SeqTrvLenConst&>(parent).length);
11936}
11937
11938// --- fasttest.SeqTrvLenConst..GetMsgMemptr
11939// Memptr encompassing the message (uses length field)
11940inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrvLenConst& row) {
11941    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrvLenConst&>(row).length));
11942}
11943
11944// --- fasttest.SeqTrvLenConst..Init
11945// Set all fields to initial values.
11946inline void fasttest::SeqTrvLenConst_Init(fasttest::SeqTrvLenConst& parent) {
11947    parent.length = u32(ssizeof(parent) + (0));
11948    parent.id = u32(131);
11949}
11950inline fasttest::TrvSeqLenConstOpt::TrvSeqLenConstOpt() {
11951    fasttest::TrvSeqLenConstOpt_Init(*this);
11952}
11953
11954
11955// --- fasttest.TrvSeqLenConstOpt..Init
11956// Set all fields to initial values.
11957inline void fasttest::TrvSeqLenConstOpt_Init(fasttest::TrvSeqLenConstOpt& parent) {
11958    parent.Value = u32(0);
11959}
11960inline fasttest::SeqTrvLenConstOpt::SeqTrvLenConstOpt() {
11961    fasttest::SeqTrvLenConstOpt_Init(*this);
11962}
11963
11964
11965// --- fasttest.SeqTrvLenConstOpt.base.Castdown
11966// Check if fasttest::TemplateHeader is an instance of SeqTrvLenConstOpt by checking the type field
11967// If it is, return the pointer of target type.
11968// Additionally, check if the length field permits valid instance of SeqTrvLenConstOpt.
11969// If not successful, quietly return NULL.
11970inline fasttest::SeqTrvLenConstOpt* fasttest::SeqTrvLenConstOpt_Castdown(fasttest::TemplateHeader &hdr) {
11971    bool cond = hdr.id == (132);
11972    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrvLenConstOpt);
11973    return cond ? reinterpret_cast<fasttest::SeqTrvLenConstOpt*>(&hdr) : NULL;
11974}
11975
11976// --- fasttest.SeqTrvLenConstOpt.base.Castbase
11977inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrvLenConstOpt& parent) {
11978    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
11979}
11980
11981// --- fasttest.SeqTrvLenConstOpt.pmask.N
11982// Return constant 1
11983inline int fasttest::pmask_N(fasttest::SeqTrvLenConstOpt& parent) {
11984    (void)parent;
11985    return 1;
11986}
11987
11988// --- fasttest.SeqTrvLenConstOpt.pmask.qFind
11989// Access value
11990inline u32& fasttest::pmask_qFind(fasttest::SeqTrvLenConstOpt& parent, int) {
11991    return parent.pmask;
11992}
11993
11994// --- fasttest.SeqTrvLenConstOpt.pmask.NBits
11995// Get max # of bits in the bitset
11996// Return max. number of bits supported by array
11997inline int fasttest::pmask_Nbits(fasttest::SeqTrvLenConstOpt& parent) {
11998    return pmask_N(parent) * 32;
11999}
12000
12001// --- fasttest.SeqTrvLenConstOpt.pmask.qGetBit
12002// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
12003inline bool fasttest::pmask_qGetBit(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx) {
12004    u64 elem_idx = bit_idx >> 5;
12005    u64 shift = bit_idx & 31;
12006    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
12007    return bool((elem >> shift) & 1); // extract bit
12008}
12009
12010// --- fasttest.SeqTrvLenConstOpt.pmask.GetBit
12011// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
12012inline bool fasttest::pmask_GetBit(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx) {
12013    u64 elem_idx = bit_idx >> 5;
12014    u64 shift = bit_idx & 31;
12015    bool ret = false;
12016    u64 lim = pmask_N(parent);
12017    if (elem_idx < lim) {
12018        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
12019        ret = (elem >> shift) & 1;                 // extract bit
12020    }
12021    return ret;
12022}
12023
12024// --- fasttest.SeqTrvLenConstOpt.pmask.BitsEmptyQ
12025// Check if all the bits in the bitset are equal to zero
12026inline bool fasttest::pmask_BitsEmptyQ(fasttest::SeqTrvLenConstOpt& parent) {
12027    bool retval = true;
12028    u64 n = pmask_N(parent);
12029    for (u64 i = 0; i < n; i++) {
12030        if (pmask_qFind(parent,i) != 0) {
12031            retval = false;
12032            break;
12033        }
12034    }
12035    return retval;
12036}
12037
12038// --- fasttest.SeqTrvLenConstOpt.pmask.Sum1s
12039inline u64 fasttest::pmask_Sum1s(fasttest::SeqTrvLenConstOpt& parent) {
12040    u64 sum = 0;
12041    u64 n = pmask_N(parent);
12042    for (u64 i = 0; i < n; i++) {
12043        sum += algo::u32_Count1s(pmask_qFind(parent, i));
12044    }
12045    return sum;
12046}
12047
12048// --- fasttest.SeqTrvLenConstOpt.pmask.qClearBit
12049// Clear bit # BIT_IDX in bit set. No bounds checking
12050inline void fasttest::pmask_qClearBit(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx) {
12051    u64 elem_idx = bit_idx >> 5;
12052    u64 shift = bit_idx & 31;
12053    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12054    elem = elem & ~(u32(1) << shift); // clear bit
12055}
12056
12057// --- fasttest.SeqTrvLenConstOpt.pmask.ClearBit
12058// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
12059inline void fasttest::pmask_ClearBit(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx) {
12060    u64 elem_idx = bit_idx >> 5;
12061    u64 shift = bit_idx & 31;
12062    u64 lim = pmask_N(parent);
12063    if (elem_idx < lim) {
12064        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12065        elem = elem & ~(u32(1) << shift); // clear bit
12066    }
12067}
12068
12069// --- fasttest.SeqTrvLenConstOpt.pmask.qSetBit
12070// Set bit # BIT_IDX in bit set. No bounds checking
12071inline void fasttest::pmask_qSetBit(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx) {
12072    u64 elem_idx = bit_idx >> 5;
12073    u64 shift = bit_idx & 31;
12074    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12075    elem = elem | (u32(1) << shift); // set bit
12076}
12077
12078// --- fasttest.SeqTrvLenConstOpt.pmask.SetBit
12079// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
12080inline void fasttest::pmask_SetBit(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx) {
12081    u64 elem_idx = bit_idx >> 5;
12082    u64 shift = bit_idx & 31;
12083    u64 lim = pmask_N(parent);
12084    if (elem_idx < lim) {
12085        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12086        elem = elem | (u32(1) << shift); // set bit
12087    }
12088}
12089
12090// --- fasttest.SeqTrvLenConstOpt.pmask.qSetBitVal
12091// Set bit # BIT_IDX in bit set. No bounds checking
12092inline void fasttest::pmask_qSetBitVal(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx, bool val) {
12093    u64 elem_idx = bit_idx >> 5;
12094    u64 shift = bit_idx & 31;
12095    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12096    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
12097}
12098
12099// --- fasttest.SeqTrvLenConstOpt.pmask.qOrBitVal
12100// Or bit # BIT_IDX in bit set. No bounds checking
12101inline void fasttest::pmask_qOrBitVal(fasttest::SeqTrvLenConstOpt& parent, u32 bit_idx, bool val) {
12102    u64 elem_idx = bit_idx >> 5;
12103    u64 shift = bit_idx & 31;
12104    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12105    elem = elem | (u32(val) << shift); // Or in val into elem
12106}
12107
12108// --- fasttest.SeqTrvLenConstOpt.pmask.ClearBitsAll
12109// Set all bits of array to zero.
12110// Note: this does not change what NBits will return.
12111inline void fasttest::pmask_ClearBitsAll(fasttest::SeqTrvLenConstOpt& parent) {
12112    u64 n = pmask_N(parent);
12113    for (u64 i = 0; i < n; i++) {
12114        pmask_qFind(parent, i) = 0;
12115    }
12116}
12117
12118// --- fasttest.SeqTrvLenConstOpt.pmask.ClearBits
12119// Zero in PARENT any bits that are set in RHS.
12120inline void fasttest::pmask_ClearBits(fasttest::SeqTrvLenConstOpt& parent, fasttest::SeqTrvLenConstOpt &rhs) {
12121    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
12122    for (u64 i = 0; i < n; i++) {
12123        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
12124    }
12125}
12126
12127// --- fasttest.SeqTrvLenConstOpt.pmask.OrBits
12128// Set PARENT to union of two bitsets.
12129// (This function is not named Set.. to avoid triple entendre).
12130inline void fasttest::pmask_OrBits(fasttest::SeqTrvLenConstOpt& parent, fasttest::SeqTrvLenConstOpt &rhs) {
12131    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
12132    for (u64 i = 0; i < n; i++) {
12133        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
12134    }
12135}
12136
12137// --- fasttest.SeqTrvLenConstOpt.pmask.Sup
12138// Return smallest number N such that indexes of all 1 bits are below N
12139inline i32 fasttest::pmask_Sup(fasttest::SeqTrvLenConstOpt& parent) {
12140    u64 lim = pmask_N(parent);
12141    i32 ret = 0;
12142    for (int i = lim-1; i >= 0; i--) {
12143        u32 &val = pmask_qFind(parent, i);
12144        if (val) {
12145            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
12146            ret = i * 32 + bitidx;
12147            break;
12148        }
12149    }
12150    return ret;
12151}
12152
12153// --- fasttest.SeqTrvLenConstOpt.TrvSeqLenConstOpt.PresentQ
12154// Return true if the field is marked in the presence mask
12155inline bool fasttest::TrvSeqLenConstOpt_PresentQ(fasttest::SeqTrvLenConstOpt& parent) {
12156    return pmask_qGetBit(parent, 0);
12157}
12158
12159// --- fasttest.SeqTrvLenConstOpt.TrvSeqLenConstOpt.SetPresent
12160// Set presence bit for this field in the pmask
12161inline void fasttest::TrvSeqLenConstOpt_SetPresent(fasttest::SeqTrvLenConstOpt& parent) {
12162    pmask_qSetBit(parent, 0); // mark presence in pmask
12163}
12164
12165// --- fasttest.SeqTrvLenConstOpt.TrvSeqLenConstOpt.Present_GetBit
12166// Return field's bit number in the pmask
12167inline int fasttest::TrvSeqLenConstOpt_Present_GetBit(fasttest::SeqTrvLenConstOpt& parent) {
12168    int retval = 0;
12169    (void)parent;//only to avoid -Wunused-parameter
12170    return retval;
12171}
12172
12173// --- fasttest.SeqTrvLenConstOpt.TrvSeqLenConstOpt.Set
12174inline void fasttest::TrvSeqLenConstOpt_Set(fasttest::SeqTrvLenConstOpt& parent, const fasttest::TrvSeqLenConstOpt& rhs) {
12175    parent.TrvSeqLenConstOpt = rhs;
12176    pmask_qSetBit(parent, 0); // mark presence in pmask
12177}
12178
12179// --- fasttest.SeqTrvLenConstOpt.pmask_bitcurs.Reset
12180inline void fasttest::SeqTrvLenConstOpt_pmask_bitcurs_Reset(SeqTrvLenConstOpt_pmask_bitcurs &curs, fasttest::SeqTrvLenConstOpt &parent) {
12181    curs.elems = &pmask_qFind(parent,0);
12182    curs.n_elems = pmask_N(parent);
12183    curs.bit = -1;
12184    SeqTrvLenConstOpt_pmask_bitcurs_Next(curs);
12185}
12186
12187// --- fasttest.SeqTrvLenConstOpt.pmask_bitcurs.ValidQ
12188// cursor points to valid item
12189inline bool fasttest::SeqTrvLenConstOpt_pmask_bitcurs_ValidQ(SeqTrvLenConstOpt_pmask_bitcurs &curs) {
12190    return curs.bit < curs.n_elems*32;
12191}
12192
12193// --- fasttest.SeqTrvLenConstOpt.pmask_bitcurs.Access
12194// item access
12195inline int& fasttest::SeqTrvLenConstOpt_pmask_bitcurs_Access(SeqTrvLenConstOpt_pmask_bitcurs &curs) {
12196    return curs.bit;
12197}
12198
12199// --- fasttest.SeqTrvLenConstOpt..GetMsgLength
12200// Message length (uses length field)
12201inline i32 fasttest::GetMsgLength(const fasttest::SeqTrvLenConstOpt& parent) {
12202    return i32(const_cast<fasttest::SeqTrvLenConstOpt&>(parent).length);
12203}
12204
12205// --- fasttest.SeqTrvLenConstOpt..GetMsgMemptr
12206// Memptr encompassing the message (uses length field)
12207inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrvLenConstOpt& row) {
12208    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrvLenConstOpt&>(row).length));
12209}
12210
12211// --- fasttest.SeqTrvLenConstOpt..Init
12212// Set all fields to initial values.
12213inline void fasttest::SeqTrvLenConstOpt_Init(fasttest::SeqTrvLenConstOpt& parent) {
12214    parent.length = u32(ssizeof(parent) + (0));
12215    parent.id = u32(132);
12216    parent.pmask = u32(0);
12217}
12218inline fasttest::TrvSeqLenDflt::TrvSeqLenDflt() {
12219    fasttest::TrvSeqLenDflt_Init(*this);
12220}
12221
12222
12223// --- fasttest.TrvSeqLenDflt..Init
12224// Set all fields to initial values.
12225inline void fasttest::TrvSeqLenDflt_Init(fasttest::TrvSeqLenDflt& TrvSeqLenDflt) {
12226    TrvSeqLenDflt.Value = u32(0);
12227}
12228inline fasttest::SeqTrvLenDflt::SeqTrvLenDflt() {
12229    fasttest::SeqTrvLenDflt_Init(*this);
12230}
12231
12232
12233// --- fasttest.SeqTrvLenDflt.base.Castdown
12234// Check if fasttest::TemplateHeader is an instance of SeqTrvLenDflt by checking the type field
12235// If it is, return the pointer of target type.
12236// Additionally, check if the length field permits valid instance of SeqTrvLenDflt.
12237// If not successful, quietly return NULL.
12238inline fasttest::SeqTrvLenDflt* fasttest::SeqTrvLenDflt_Castdown(fasttest::TemplateHeader &hdr) {
12239    bool cond = hdr.id == (133);
12240    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrvLenDflt);
12241    return cond ? reinterpret_cast<fasttest::SeqTrvLenDflt*>(&hdr) : NULL;
12242}
12243
12244// --- fasttest.SeqTrvLenDflt.base.Castbase
12245inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrvLenDflt& parent) {
12246    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12247}
12248
12249// --- fasttest.SeqTrvLenDflt.TrvSeqLenDflt.N
12250// Return number of elements in varlen field
12251inline u32 fasttest::TrvSeqLenDflt_N(const fasttest::SeqTrvLenDflt& parent) {
12252    u32 length = i32(((fasttest::SeqTrvLenDflt&)parent).length);
12253    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqTrvLenDflt)) - sizeof(fasttest::SeqTrvLenDflt); // avoid unsigned subtraction underflow
12254    return u32(extra_bytes / sizeof(fasttest::TrvSeqLenDflt));
12255}
12256
12257// --- fasttest.SeqTrvLenDflt.TrvSeqLenDflt_curs.Reset
12258inline void fasttest::SeqTrvLenDflt_TrvSeqLenDflt_curs_Reset(SeqTrvLenDflt_TrvSeqLenDflt_curs &curs, fasttest::SeqTrvLenDflt &parent) {
12259    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqTrvLenDflt);
12260    curs.length = i32(parent.length) - sizeof(fasttest::SeqTrvLenDflt);
12261    curs.index = 0;
12262}
12263
12264// --- fasttest.SeqTrvLenDflt.TrvSeqLenDflt_curs.ValidQ
12265// cursor points to valid item
12266inline bool fasttest::SeqTrvLenDflt_TrvSeqLenDflt_curs_ValidQ(SeqTrvLenDflt_TrvSeqLenDflt_curs &curs) {
12267    bool valid = ssizeof(fasttest::TrvSeqLenDflt) <= curs.length;
12268    return valid;
12269}
12270
12271// --- fasttest.SeqTrvLenDflt.TrvSeqLenDflt_curs.Next
12272// proceed to next item
12273inline void fasttest::SeqTrvLenDflt_TrvSeqLenDflt_curs_Next(SeqTrvLenDflt_TrvSeqLenDflt_curs &curs) {
12274    i32 len = i32(sizeof(fasttest::TrvSeqLenDflt));
12275    curs.ptr += len;
12276    curs.length -= len;
12277    ++curs.index;
12278}
12279
12280// --- fasttest.SeqTrvLenDflt.TrvSeqLenDflt_curs.Access
12281// item access
12282inline fasttest::TrvSeqLenDflt& fasttest::SeqTrvLenDflt_TrvSeqLenDflt_curs_Access(SeqTrvLenDflt_TrvSeqLenDflt_curs &curs) {
12283    return *(fasttest::TrvSeqLenDflt*)curs.ptr;
12284}
12285
12286// --- fasttest.SeqTrvLenDflt..GetMsgLength
12287// Message length (uses length field)
12288inline i32 fasttest::GetMsgLength(const fasttest::SeqTrvLenDflt& parent) {
12289    return i32(const_cast<fasttest::SeqTrvLenDflt&>(parent).length);
12290}
12291
12292// --- fasttest.SeqTrvLenDflt..GetMsgMemptr
12293// Memptr encompassing the message (uses length field)
12294inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrvLenDflt& row) {
12295    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrvLenDflt&>(row).length));
12296}
12297
12298// --- fasttest.SeqTrvLenDflt..Init
12299// Set all fields to initial values.
12300inline void fasttest::SeqTrvLenDflt_Init(fasttest::SeqTrvLenDflt& parent) {
12301    parent.length = u32(ssizeof(parent) + (0));
12302    parent.id = u32(133);
12303}
12304inline fasttest::TrvSeqDfltOpt::TrvSeqDfltOpt() {
12305    fasttest::TrvSeqDfltOpt_Init(*this);
12306}
12307
12308
12309// --- fasttest.TrvSeqDfltOpt..Init
12310// Set all fields to initial values.
12311inline void fasttest::TrvSeqDfltOpt_Init(fasttest::TrvSeqDfltOpt& TrvSeqDfltOpt) {
12312    TrvSeqDfltOpt.Value = u32(0);
12313}
12314inline fasttest::SeqTrvLenDfltOpt::SeqTrvLenDfltOpt() {
12315    fasttest::SeqTrvLenDfltOpt_Init(*this);
12316}
12317
12318
12319// --- fasttest.SeqTrvLenDfltOpt.base.Castdown
12320// Check if fasttest::TemplateHeader is an instance of SeqTrvLenDfltOpt by checking the type field
12321// If it is, return the pointer of target type.
12322// Additionally, check if the length field permits valid instance of SeqTrvLenDfltOpt.
12323// If not successful, quietly return NULL.
12324inline fasttest::SeqTrvLenDfltOpt* fasttest::SeqTrvLenDfltOpt_Castdown(fasttest::TemplateHeader &hdr) {
12325    bool cond = hdr.id == (134);
12326    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrvLenDfltOpt);
12327    return cond ? reinterpret_cast<fasttest::SeqTrvLenDfltOpt*>(&hdr) : NULL;
12328}
12329
12330// --- fasttest.SeqTrvLenDfltOpt.base.Castbase
12331inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrvLenDfltOpt& parent) {
12332    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12333}
12334
12335// --- fasttest.SeqTrvLenDfltOpt.TrvSeqDfltOpt.N
12336// Return number of elements in varlen field
12337inline u32 fasttest::TrvSeqDfltOpt_N(const fasttest::SeqTrvLenDfltOpt& parent) {
12338    u32 length = i32(((fasttest::SeqTrvLenDfltOpt&)parent).length);
12339    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqTrvLenDfltOpt)) - sizeof(fasttest::SeqTrvLenDfltOpt); // avoid unsigned subtraction underflow
12340    return u32(extra_bytes / sizeof(fasttest::TrvSeqDfltOpt));
12341}
12342
12343// --- fasttest.SeqTrvLenDfltOpt.TrvSeqDfltOpt_curs.Reset
12344inline void fasttest::SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs_Reset(SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs &curs, fasttest::SeqTrvLenDfltOpt &parent) {
12345    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqTrvLenDfltOpt);
12346    curs.length = i32(parent.length) - sizeof(fasttest::SeqTrvLenDfltOpt);
12347    curs.index = 0;
12348}
12349
12350// --- fasttest.SeqTrvLenDfltOpt.TrvSeqDfltOpt_curs.ValidQ
12351// cursor points to valid item
12352inline bool fasttest::SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs_ValidQ(SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs &curs) {
12353    bool valid = ssizeof(fasttest::TrvSeqDfltOpt) <= curs.length;
12354    return valid;
12355}
12356
12357// --- fasttest.SeqTrvLenDfltOpt.TrvSeqDfltOpt_curs.Next
12358// proceed to next item
12359inline void fasttest::SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs_Next(SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs &curs) {
12360    i32 len = i32(sizeof(fasttest::TrvSeqDfltOpt));
12361    curs.ptr += len;
12362    curs.length -= len;
12363    ++curs.index;
12364}
12365
12366// --- fasttest.SeqTrvLenDfltOpt.TrvSeqDfltOpt_curs.Access
12367// item access
12368inline fasttest::TrvSeqDfltOpt& fasttest::SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs_Access(SeqTrvLenDfltOpt_TrvSeqDfltOpt_curs &curs) {
12369    return *(fasttest::TrvSeqDfltOpt*)curs.ptr;
12370}
12371
12372// --- fasttest.SeqTrvLenDfltOpt..GetMsgLength
12373// Message length (uses length field)
12374inline i32 fasttest::GetMsgLength(const fasttest::SeqTrvLenDfltOpt& parent) {
12375    return i32(const_cast<fasttest::SeqTrvLenDfltOpt&>(parent).length);
12376}
12377
12378// --- fasttest.SeqTrvLenDfltOpt..GetMsgMemptr
12379// Memptr encompassing the message (uses length field)
12380inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrvLenDfltOpt& row) {
12381    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrvLenDfltOpt&>(row).length));
12382}
12383
12384// --- fasttest.SeqTrvLenDfltOpt..Init
12385// Set all fields to initial values.
12386inline void fasttest::SeqTrvLenDfltOpt_Init(fasttest::SeqTrvLenDfltOpt& parent) {
12387    parent.length = u32(ssizeof(parent) + (0));
12388    parent.id = u32(134);
12389}
12390inline fasttest::TrvSeqLenNone::TrvSeqLenNone() {
12391    fasttest::TrvSeqLenNone_Init(*this);
12392}
12393
12394
12395// --- fasttest.TrvSeqLenNone..Init
12396// Set all fields to initial values.
12397inline void fasttest::TrvSeqLenNone_Init(fasttest::TrvSeqLenNone& TrvSeqLenNone) {
12398    TrvSeqLenNone.Value = u32(0);
12399}
12400inline fasttest::SeqTrvLenNone::SeqTrvLenNone() {
12401    fasttest::SeqTrvLenNone_Init(*this);
12402}
12403
12404
12405// --- fasttest.SeqTrvLenNone.base.Castdown
12406// Check if fasttest::TemplateHeader is an instance of SeqTrvLenNone by checking the type field
12407// If it is, return the pointer of target type.
12408// Additionally, check if the length field permits valid instance of SeqTrvLenNone.
12409// If not successful, quietly return NULL.
12410inline fasttest::SeqTrvLenNone* fasttest::SeqTrvLenNone_Castdown(fasttest::TemplateHeader &hdr) {
12411    bool cond = hdr.id == (129);
12412    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrvLenNone);
12413    return cond ? reinterpret_cast<fasttest::SeqTrvLenNone*>(&hdr) : NULL;
12414}
12415
12416// --- fasttest.SeqTrvLenNone.base.Castbase
12417inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrvLenNone& parent) {
12418    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12419}
12420
12421// --- fasttest.SeqTrvLenNone.TrvSeqLenNone.N
12422// Return number of elements in varlen field
12423inline u32 fasttest::TrvSeqLenNone_N(const fasttest::SeqTrvLenNone& parent) {
12424    u32 length = i32(((fasttest::SeqTrvLenNone&)parent).length);
12425    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqTrvLenNone)) - sizeof(fasttest::SeqTrvLenNone); // avoid unsigned subtraction underflow
12426    return u32(extra_bytes / sizeof(fasttest::TrvSeqLenNone));
12427}
12428
12429// --- fasttest.SeqTrvLenNone.TrvSeqLenNone_curs.Reset
12430inline void fasttest::SeqTrvLenNone_TrvSeqLenNone_curs_Reset(SeqTrvLenNone_TrvSeqLenNone_curs &curs, fasttest::SeqTrvLenNone &parent) {
12431    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqTrvLenNone);
12432    curs.length = i32(parent.length) - sizeof(fasttest::SeqTrvLenNone);
12433    curs.index = 0;
12434}
12435
12436// --- fasttest.SeqTrvLenNone.TrvSeqLenNone_curs.ValidQ
12437// cursor points to valid item
12438inline bool fasttest::SeqTrvLenNone_TrvSeqLenNone_curs_ValidQ(SeqTrvLenNone_TrvSeqLenNone_curs &curs) {
12439    bool valid = ssizeof(fasttest::TrvSeqLenNone) <= curs.length;
12440    return valid;
12441}
12442
12443// --- fasttest.SeqTrvLenNone.TrvSeqLenNone_curs.Next
12444// proceed to next item
12445inline void fasttest::SeqTrvLenNone_TrvSeqLenNone_curs_Next(SeqTrvLenNone_TrvSeqLenNone_curs &curs) {
12446    i32 len = i32(sizeof(fasttest::TrvSeqLenNone));
12447    curs.ptr += len;
12448    curs.length -= len;
12449    ++curs.index;
12450}
12451
12452// --- fasttest.SeqTrvLenNone.TrvSeqLenNone_curs.Access
12453// item access
12454inline fasttest::TrvSeqLenNone& fasttest::SeqTrvLenNone_TrvSeqLenNone_curs_Access(SeqTrvLenNone_TrvSeqLenNone_curs &curs) {
12455    return *(fasttest::TrvSeqLenNone*)curs.ptr;
12456}
12457
12458// --- fasttest.SeqTrvLenNone..GetMsgLength
12459// Message length (uses length field)
12460inline i32 fasttest::GetMsgLength(const fasttest::SeqTrvLenNone& parent) {
12461    return i32(const_cast<fasttest::SeqTrvLenNone&>(parent).length);
12462}
12463
12464// --- fasttest.SeqTrvLenNone..GetMsgMemptr
12465// Memptr encompassing the message (uses length field)
12466inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrvLenNone& row) {
12467    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrvLenNone&>(row).length));
12468}
12469
12470// --- fasttest.SeqTrvLenNone..Init
12471// Set all fields to initial values.
12472inline void fasttest::SeqTrvLenNone_Init(fasttest::SeqTrvLenNone& parent) {
12473    parent.length = u32(ssizeof(parent) + (0));
12474    parent.id = u32(129);
12475}
12476inline fasttest::TrvSeqLenNoneOpt::TrvSeqLenNoneOpt() {
12477    fasttest::TrvSeqLenNoneOpt_Init(*this);
12478}
12479
12480
12481// --- fasttest.TrvSeqLenNoneOpt..Init
12482// Set all fields to initial values.
12483inline void fasttest::TrvSeqLenNoneOpt_Init(fasttest::TrvSeqLenNoneOpt& TrvSeqLenNoneOpt) {
12484    TrvSeqLenNoneOpt.Value = u32(0);
12485}
12486inline fasttest::SeqTrvLenNoneOpt::SeqTrvLenNoneOpt() {
12487    fasttest::SeqTrvLenNoneOpt_Init(*this);
12488}
12489
12490
12491// --- fasttest.SeqTrvLenNoneOpt.base.Castdown
12492// Check if fasttest::TemplateHeader is an instance of SeqTrvLenNoneOpt by checking the type field
12493// If it is, return the pointer of target type.
12494// Additionally, check if the length field permits valid instance of SeqTrvLenNoneOpt.
12495// If not successful, quietly return NULL.
12496inline fasttest::SeqTrvLenNoneOpt* fasttest::SeqTrvLenNoneOpt_Castdown(fasttest::TemplateHeader &hdr) {
12497    bool cond = hdr.id == (130);
12498    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrvLenNoneOpt);
12499    return cond ? reinterpret_cast<fasttest::SeqTrvLenNoneOpt*>(&hdr) : NULL;
12500}
12501
12502// --- fasttest.SeqTrvLenNoneOpt.base.Castbase
12503inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrvLenNoneOpt& parent) {
12504    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12505}
12506
12507// --- fasttest.SeqTrvLenNoneOpt.TrvSeqLenNoneOpt.N
12508// Return number of elements in varlen field
12509inline u32 fasttest::TrvSeqLenNoneOpt_N(const fasttest::SeqTrvLenNoneOpt& parent) {
12510    u32 length = i32(((fasttest::SeqTrvLenNoneOpt&)parent).length);
12511    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqTrvLenNoneOpt)) - sizeof(fasttest::SeqTrvLenNoneOpt); // avoid unsigned subtraction underflow
12512    return u32(extra_bytes / sizeof(fasttest::TrvSeqLenNoneOpt));
12513}
12514
12515// --- fasttest.SeqTrvLenNoneOpt.TrvSeqLenNoneOpt_curs.Reset
12516inline void fasttest::SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs_Reset(SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs &curs, fasttest::SeqTrvLenNoneOpt &parent) {
12517    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqTrvLenNoneOpt);
12518    curs.length = i32(parent.length) - sizeof(fasttest::SeqTrvLenNoneOpt);
12519    curs.index = 0;
12520}
12521
12522// --- fasttest.SeqTrvLenNoneOpt.TrvSeqLenNoneOpt_curs.ValidQ
12523// cursor points to valid item
12524inline bool fasttest::SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs_ValidQ(SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs &curs) {
12525    bool valid = ssizeof(fasttest::TrvSeqLenNoneOpt) <= curs.length;
12526    return valid;
12527}
12528
12529// --- fasttest.SeqTrvLenNoneOpt.TrvSeqLenNoneOpt_curs.Next
12530// proceed to next item
12531inline void fasttest::SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs_Next(SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs &curs) {
12532    i32 len = i32(sizeof(fasttest::TrvSeqLenNoneOpt));
12533    curs.ptr += len;
12534    curs.length -= len;
12535    ++curs.index;
12536}
12537
12538// --- fasttest.SeqTrvLenNoneOpt.TrvSeqLenNoneOpt_curs.Access
12539// item access
12540inline fasttest::TrvSeqLenNoneOpt& fasttest::SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs_Access(SeqTrvLenNoneOpt_TrvSeqLenNoneOpt_curs &curs) {
12541    return *(fasttest::TrvSeqLenNoneOpt*)curs.ptr;
12542}
12543
12544// --- fasttest.SeqTrvLenNoneOpt..GetMsgLength
12545// Message length (uses length field)
12546inline i32 fasttest::GetMsgLength(const fasttest::SeqTrvLenNoneOpt& parent) {
12547    return i32(const_cast<fasttest::SeqTrvLenNoneOpt&>(parent).length);
12548}
12549
12550// --- fasttest.SeqTrvLenNoneOpt..GetMsgMemptr
12551// Memptr encompassing the message (uses length field)
12552inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrvLenNoneOpt& row) {
12553    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrvLenNoneOpt&>(row).length));
12554}
12555
12556// --- fasttest.SeqTrvLenNoneOpt..Init
12557// Set all fields to initial values.
12558inline void fasttest::SeqTrvLenNoneOpt_Init(fasttest::SeqTrvLenNoneOpt& parent) {
12559    parent.length = u32(ssizeof(parent) + (0));
12560    parent.id = u32(130);
12561}
12562inline fasttest::SeqTrvOpt::SeqTrvOpt() {
12563    fasttest::SeqTrvOpt_Init(*this);
12564}
12565
12566
12567// --- fasttest.SeqTrvOpt.base.Castdown
12568// Check if fasttest::TemplateHeader is an instance of SeqTrvOpt by checking the type field
12569// If it is, return the pointer of target type.
12570// Additionally, check if the length field permits valid instance of SeqTrvOpt.
12571// If not successful, quietly return NULL.
12572inline fasttest::SeqTrvOpt* fasttest::SeqTrvOpt_Castdown(fasttest::TemplateHeader &hdr) {
12573    bool cond = hdr.id == (117);
12574    cond &= i32(hdr.length) >= ssizeof(fasttest::SeqTrvOpt);
12575    return cond ? reinterpret_cast<fasttest::SeqTrvOpt*>(&hdr) : NULL;
12576}
12577
12578// --- fasttest.SeqTrvOpt.base.Castbase
12579inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::SeqTrvOpt& parent) {
12580    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12581}
12582
12583// --- fasttest.SeqTrvOpt.OptTrvSeq.N
12584// Return number of elements in varlen field
12585inline u32 fasttest::OptTrvSeq_N(const fasttest::SeqTrvOpt& parent) {
12586    u32 length = i32(((fasttest::SeqTrvOpt&)parent).length);
12587    u32 extra_bytes = u32_Max(length,sizeof(fasttest::SeqTrvOpt)) - sizeof(fasttest::SeqTrvOpt); // avoid unsigned subtraction underflow
12588    return u32(extra_bytes / sizeof(fasttest::OptTrvSeq));
12589}
12590
12591// --- fasttest.SeqTrvOpt.OptTrvSeq_curs.Reset
12592inline void fasttest::SeqTrvOpt_OptTrvSeq_curs_Reset(SeqTrvOpt_OptTrvSeq_curs &curs, fasttest::SeqTrvOpt &parent) {
12593    curs.ptr = (u8*)&parent + sizeof(fasttest::SeqTrvOpt);
12594    curs.length = i32(parent.length) - sizeof(fasttest::SeqTrvOpt);
12595    curs.index = 0;
12596}
12597
12598// --- fasttest.SeqTrvOpt.OptTrvSeq_curs.ValidQ
12599// cursor points to valid item
12600inline bool fasttest::SeqTrvOpt_OptTrvSeq_curs_ValidQ(SeqTrvOpt_OptTrvSeq_curs &curs) {
12601    bool valid = ssizeof(fasttest::OptTrvSeq) <= curs.length;
12602    return valid;
12603}
12604
12605// --- fasttest.SeqTrvOpt.OptTrvSeq_curs.Next
12606// proceed to next item
12607inline void fasttest::SeqTrvOpt_OptTrvSeq_curs_Next(SeqTrvOpt_OptTrvSeq_curs &curs) {
12608    i32 len = i32(sizeof(fasttest::OptTrvSeq));
12609    curs.ptr += len;
12610    curs.length -= len;
12611    ++curs.index;
12612}
12613
12614// --- fasttest.SeqTrvOpt.OptTrvSeq_curs.Access
12615// item access
12616inline fasttest::OptTrvSeq& fasttest::SeqTrvOpt_OptTrvSeq_curs_Access(SeqTrvOpt_OptTrvSeq_curs &curs) {
12617    return *(fasttest::OptTrvSeq*)curs.ptr;
12618}
12619
12620// --- fasttest.SeqTrvOpt..GetMsgLength
12621// Message length (uses length field)
12622inline i32 fasttest::GetMsgLength(const fasttest::SeqTrvOpt& parent) {
12623    return i32(const_cast<fasttest::SeqTrvOpt&>(parent).length);
12624}
12625
12626// --- fasttest.SeqTrvOpt..GetMsgMemptr
12627// Memptr encompassing the message (uses length field)
12628inline algo::memptr fasttest::GetMsgMemptr(const fasttest::SeqTrvOpt& row) {
12629    return algo::memptr((u8*)&row, i32(const_cast<fasttest::SeqTrvOpt&>(row).length));
12630}
12631
12632// --- fasttest.SeqTrvOpt..Init
12633// Set all fields to initial values.
12634inline void fasttest::SeqTrvOpt_Init(fasttest::SeqTrvOpt& parent) {
12635    parent.length = u32(ssizeof(parent) + (0));
12636    parent.id = u32(117);
12637}
12638inline fasttest::StrConst::StrConst() {
12639    fasttest::StrConst_Init(*this);
12640}
12641
12642
12643// --- fasttest.StrConst.base.Castdown
12644// Check if fasttest::TemplateHeader is an instance of StrConst by checking the type field
12645// If it is, return the pointer of target type.
12646// Additionally, check if the length field permits valid instance of StrConst.
12647// If not successful, quietly return NULL.
12648inline fasttest::StrConst* fasttest::StrConst_Castdown(fasttest::TemplateHeader &hdr) {
12649    bool cond = hdr.id == (21);
12650    cond &= i32(hdr.length) >= ssizeof(fasttest::StrConst);
12651    return cond ? reinterpret_cast<fasttest::StrConst*>(&hdr) : NULL;
12652}
12653
12654// --- fasttest.StrConst.base.Castbase
12655inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrConst& parent) {
12656    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12657}
12658
12659// --- fasttest.StrConst.Value.Get
12660inline algo::strptr fasttest::Value_Get(fasttest::StrConst& parent) {
12661    (void)parent;
12662    return algo::strptr("A21");
12663}
12664
12665// --- fasttest.StrConst..GetMsgLength
12666// Message length (uses length field)
12667inline i32 fasttest::GetMsgLength(const fasttest::StrConst& parent) {
12668    return i32(const_cast<fasttest::StrConst&>(parent).length);
12669}
12670
12671// --- fasttest.StrConst..GetMsgMemptr
12672// Memptr encompassing the message (uses length field)
12673inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrConst& row) {
12674    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrConst&>(row).length));
12675}
12676
12677// --- fasttest.StrConst..Init
12678// Set all fields to initial values.
12679inline void fasttest::StrConst_Init(fasttest::StrConst& parent) {
12680    parent.length = u32(ssizeof(parent) + (0));
12681    parent.id = u32(21);
12682}
12683inline fasttest::StrConstOpt::StrConstOpt() {
12684    fasttest::StrConstOpt_Init(*this);
12685}
12686
12687
12688// --- fasttest.StrConstOpt.base.Castdown
12689// Check if fasttest::TemplateHeader is an instance of StrConstOpt by checking the type field
12690// If it is, return the pointer of target type.
12691// Additionally, check if the length field permits valid instance of StrConstOpt.
12692// If not successful, quietly return NULL.
12693inline fasttest::StrConstOpt* fasttest::StrConstOpt_Castdown(fasttest::TemplateHeader &hdr) {
12694    bool cond = hdr.id == (22);
12695    cond &= i32(hdr.length) >= ssizeof(fasttest::StrConstOpt);
12696    return cond ? reinterpret_cast<fasttest::StrConstOpt*>(&hdr) : NULL;
12697}
12698
12699// --- fasttest.StrConstOpt.base.Castbase
12700inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrConstOpt& parent) {
12701    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12702}
12703
12704// --- fasttest.StrConstOpt.pmask.N
12705// Return constant 1
12706inline int fasttest::pmask_N(fasttest::StrConstOpt& parent) {
12707    (void)parent;
12708    return 1;
12709}
12710
12711// --- fasttest.StrConstOpt.pmask.qFind
12712// Access value
12713inline u32& fasttest::pmask_qFind(fasttest::StrConstOpt& parent, int) {
12714    return parent.pmask;
12715}
12716
12717// --- fasttest.StrConstOpt.pmask.NBits
12718// Get max # of bits in the bitset
12719// Return max. number of bits supported by array
12720inline int fasttest::pmask_Nbits(fasttest::StrConstOpt& parent) {
12721    return pmask_N(parent) * 32;
12722}
12723
12724// --- fasttest.StrConstOpt.pmask.qGetBit
12725// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
12726inline bool fasttest::pmask_qGetBit(fasttest::StrConstOpt& parent, u32 bit_idx) {
12727    u64 elem_idx = bit_idx >> 5;
12728    u64 shift = bit_idx & 31;
12729    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
12730    return bool((elem >> shift) & 1); // extract bit
12731}
12732
12733// --- fasttest.StrConstOpt.pmask.GetBit
12734// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
12735inline bool fasttest::pmask_GetBit(fasttest::StrConstOpt& parent, u32 bit_idx) {
12736    u64 elem_idx = bit_idx >> 5;
12737    u64 shift = bit_idx & 31;
12738    bool ret = false;
12739    u64 lim = pmask_N(parent);
12740    if (elem_idx < lim) {
12741        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
12742        ret = (elem >> shift) & 1;                 // extract bit
12743    }
12744    return ret;
12745}
12746
12747// --- fasttest.StrConstOpt.pmask.BitsEmptyQ
12748// Check if all the bits in the bitset are equal to zero
12749inline bool fasttest::pmask_BitsEmptyQ(fasttest::StrConstOpt& parent) {
12750    bool retval = true;
12751    u64 n = pmask_N(parent);
12752    for (u64 i = 0; i < n; i++) {
12753        if (pmask_qFind(parent,i) != 0) {
12754            retval = false;
12755            break;
12756        }
12757    }
12758    return retval;
12759}
12760
12761// --- fasttest.StrConstOpt.pmask.Sum1s
12762inline u64 fasttest::pmask_Sum1s(fasttest::StrConstOpt& parent) {
12763    u64 sum = 0;
12764    u64 n = pmask_N(parent);
12765    for (u64 i = 0; i < n; i++) {
12766        sum += algo::u32_Count1s(pmask_qFind(parent, i));
12767    }
12768    return sum;
12769}
12770
12771// --- fasttest.StrConstOpt.pmask.qClearBit
12772// Clear bit # BIT_IDX in bit set. No bounds checking
12773inline void fasttest::pmask_qClearBit(fasttest::StrConstOpt& parent, u32 bit_idx) {
12774    u64 elem_idx = bit_idx >> 5;
12775    u64 shift = bit_idx & 31;
12776    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12777    elem = elem & ~(u32(1) << shift); // clear bit
12778}
12779
12780// --- fasttest.StrConstOpt.pmask.ClearBit
12781// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
12782inline void fasttest::pmask_ClearBit(fasttest::StrConstOpt& parent, u32 bit_idx) {
12783    u64 elem_idx = bit_idx >> 5;
12784    u64 shift = bit_idx & 31;
12785    u64 lim = pmask_N(parent);
12786    if (elem_idx < lim) {
12787        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12788        elem = elem & ~(u32(1) << shift); // clear bit
12789    }
12790}
12791
12792// --- fasttest.StrConstOpt.pmask.qSetBit
12793// Set bit # BIT_IDX in bit set. No bounds checking
12794inline void fasttest::pmask_qSetBit(fasttest::StrConstOpt& parent, u32 bit_idx) {
12795    u64 elem_idx = bit_idx >> 5;
12796    u64 shift = bit_idx & 31;
12797    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12798    elem = elem | (u32(1) << shift); // set bit
12799}
12800
12801// --- fasttest.StrConstOpt.pmask.SetBit
12802// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
12803inline void fasttest::pmask_SetBit(fasttest::StrConstOpt& parent, u32 bit_idx) {
12804    u64 elem_idx = bit_idx >> 5;
12805    u64 shift = bit_idx & 31;
12806    u64 lim = pmask_N(parent);
12807    if (elem_idx < lim) {
12808        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12809        elem = elem | (u32(1) << shift); // set bit
12810    }
12811}
12812
12813// --- fasttest.StrConstOpt.pmask.qSetBitVal
12814// Set bit # BIT_IDX in bit set. No bounds checking
12815inline void fasttest::pmask_qSetBitVal(fasttest::StrConstOpt& parent, u32 bit_idx, bool val) {
12816    u64 elem_idx = bit_idx >> 5;
12817    u64 shift = bit_idx & 31;
12818    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12819    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
12820}
12821
12822// --- fasttest.StrConstOpt.pmask.qOrBitVal
12823// Or bit # BIT_IDX in bit set. No bounds checking
12824inline void fasttest::pmask_qOrBitVal(fasttest::StrConstOpt& parent, u32 bit_idx, bool val) {
12825    u64 elem_idx = bit_idx >> 5;
12826    u64 shift = bit_idx & 31;
12827    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
12828    elem = elem | (u32(val) << shift); // Or in val into elem
12829}
12830
12831// --- fasttest.StrConstOpt.pmask.ClearBitsAll
12832// Set all bits of array to zero.
12833// Note: this does not change what NBits will return.
12834inline void fasttest::pmask_ClearBitsAll(fasttest::StrConstOpt& parent) {
12835    u64 n = pmask_N(parent);
12836    for (u64 i = 0; i < n; i++) {
12837        pmask_qFind(parent, i) = 0;
12838    }
12839}
12840
12841// --- fasttest.StrConstOpt.pmask.ClearBits
12842// Zero in PARENT any bits that are set in RHS.
12843inline void fasttest::pmask_ClearBits(fasttest::StrConstOpt& parent, fasttest::StrConstOpt &rhs) {
12844    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
12845    for (u64 i = 0; i < n; i++) {
12846        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
12847    }
12848}
12849
12850// --- fasttest.StrConstOpt.pmask.OrBits
12851// Set PARENT to union of two bitsets.
12852// (This function is not named Set.. to avoid triple entendre).
12853inline void fasttest::pmask_OrBits(fasttest::StrConstOpt& parent, fasttest::StrConstOpt &rhs) {
12854    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
12855    for (u64 i = 0; i < n; i++) {
12856        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
12857    }
12858}
12859
12860// --- fasttest.StrConstOpt.pmask.Sup
12861// Return smallest number N such that indexes of all 1 bits are below N
12862inline i32 fasttest::pmask_Sup(fasttest::StrConstOpt& parent) {
12863    u64 lim = pmask_N(parent);
12864    i32 ret = 0;
12865    for (int i = lim-1; i >= 0; i--) {
12866        u32 &val = pmask_qFind(parent, i);
12867        if (val) {
12868            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
12869            ret = i * 32 + bitidx;
12870            break;
12871        }
12872    }
12873    return ret;
12874}
12875
12876// --- fasttest.StrConstOpt.Value.PresentQ
12877// Return true if the field is marked in the presence mask
12878inline bool fasttest::Value_PresentQ(fasttest::StrConstOpt& parent) {
12879    return pmask_qGetBit(parent, 0);
12880}
12881
12882// --- fasttest.StrConstOpt.Value.SetPresent
12883// Set presence bit for this field in the pmask
12884inline void fasttest::Value_SetPresent(fasttest::StrConstOpt& parent) {
12885    pmask_qSetBit(parent, 0); // mark presence in pmask
12886}
12887
12888// --- fasttest.StrConstOpt.Value.Present_GetBit
12889// Return field's bit number in the pmask
12890inline int fasttest::Value_Present_GetBit(fasttest::StrConstOpt& parent) {
12891    int retval = 0;
12892    (void)parent;//only to avoid -Wunused-parameter
12893    return retval;
12894}
12895
12896// --- fasttest.StrConstOpt.Value.Get
12897inline algo::strptr fasttest::Value_Get(fasttest::StrConstOpt& parent) {
12898    (void)parent;
12899    return algo::strptr("A22");
12900}
12901
12902// --- fasttest.StrConstOpt.pmask_bitcurs.Reset
12903inline void fasttest::StrConstOpt_pmask_bitcurs_Reset(StrConstOpt_pmask_bitcurs &curs, fasttest::StrConstOpt &parent) {
12904    curs.elems = &pmask_qFind(parent,0);
12905    curs.n_elems = pmask_N(parent);
12906    curs.bit = -1;
12907    StrConstOpt_pmask_bitcurs_Next(curs);
12908}
12909
12910// --- fasttest.StrConstOpt.pmask_bitcurs.ValidQ
12911// cursor points to valid item
12912inline bool fasttest::StrConstOpt_pmask_bitcurs_ValidQ(StrConstOpt_pmask_bitcurs &curs) {
12913    return curs.bit < curs.n_elems*32;
12914}
12915
12916// --- fasttest.StrConstOpt.pmask_bitcurs.Access
12917// item access
12918inline int& fasttest::StrConstOpt_pmask_bitcurs_Access(StrConstOpt_pmask_bitcurs &curs) {
12919    return curs.bit;
12920}
12921
12922// --- fasttest.StrConstOpt..GetMsgLength
12923// Message length (uses length field)
12924inline i32 fasttest::GetMsgLength(const fasttest::StrConstOpt& parent) {
12925    return i32(const_cast<fasttest::StrConstOpt&>(parent).length);
12926}
12927
12928// --- fasttest.StrConstOpt..GetMsgMemptr
12929// Memptr encompassing the message (uses length field)
12930inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrConstOpt& row) {
12931    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrConstOpt&>(row).length));
12932}
12933
12934// --- fasttest.StrConstOpt..Init
12935// Set all fields to initial values.
12936inline void fasttest::StrConstOpt_Init(fasttest::StrConstOpt& parent) {
12937    parent.length = u32(ssizeof(parent) + (0));
12938    parent.id = u32(22);
12939    parent.pmask = u32(0);
12940}
12941inline fasttest::StrCopy::StrCopy() {
12942    fasttest::StrCopy_Init(*this);
12943}
12944
12945
12946// --- fasttest.StrCopy.base.Castdown
12947// Check if fasttest::TemplateHeader is an instance of StrCopy by checking the type field
12948// If it is, return the pointer of target type.
12949// Additionally, check if the length field permits valid instance of StrCopy.
12950// If not successful, quietly return NULL.
12951inline fasttest::StrCopy* fasttest::StrCopy_Castdown(fasttest::TemplateHeader &hdr) {
12952    bool cond = hdr.id == (55);
12953    cond &= i32(hdr.length) >= ssizeof(fasttest::StrCopy);
12954    return cond ? reinterpret_cast<fasttest::StrCopy*>(&hdr) : NULL;
12955}
12956
12957// --- fasttest.StrCopy.base.Castbase
12958inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrCopy& parent) {
12959    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
12960}
12961
12962// --- fasttest.StrCopy..GetMsgLength
12963// Message length (uses length field)
12964inline i32 fasttest::GetMsgLength(const fasttest::StrCopy& parent) {
12965    return i32(const_cast<fasttest::StrCopy&>(parent).length);
12966}
12967
12968// --- fasttest.StrCopy..GetMsgMemptr
12969// Memptr encompassing the message (uses length field)
12970inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrCopy& row) {
12971    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrCopy&>(row).length));
12972}
12973
12974// --- fasttest.StrCopy..Init
12975// Set all fields to initial values.
12976inline void fasttest::StrCopy_Init(fasttest::StrCopy& parent) {
12977    parent.length = u32(ssizeof(parent) + (0));
12978    parent.id = u32(55);
12979    parent.Value55 = algo::strptr("A55");
12980}
12981inline fasttest::StrCopyNull::StrCopyNull() {
12982    fasttest::StrCopyNull_Init(*this);
12983}
12984
12985
12986// --- fasttest.StrCopyNull.base.Castdown
12987// Check if fasttest::TemplateHeader is an instance of StrCopyNull by checking the type field
12988// If it is, return the pointer of target type.
12989// Additionally, check if the length field permits valid instance of StrCopyNull.
12990// If not successful, quietly return NULL.
12991inline fasttest::StrCopyNull* fasttest::StrCopyNull_Castdown(fasttest::TemplateHeader &hdr) {
12992    bool cond = hdr.id == (57);
12993    cond &= i32(hdr.length) >= ssizeof(fasttest::StrCopyNull);
12994    return cond ? reinterpret_cast<fasttest::StrCopyNull*>(&hdr) : NULL;
12995}
12996
12997// --- fasttest.StrCopyNull.base.Castbase
12998inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrCopyNull& parent) {
12999    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
13000}
13001
13002// --- fasttest.StrCopyNull.pmask.N
13003// Return constant 1
13004inline int fasttest::pmask_N(fasttest::StrCopyNull& parent) {
13005    (void)parent;
13006    return 1;
13007}
13008
13009// --- fasttest.StrCopyNull.pmask.qFind
13010// Access value
13011inline u32& fasttest::pmask_qFind(fasttest::StrCopyNull& parent, int) {
13012    return parent.pmask;
13013}
13014
13015// --- fasttest.StrCopyNull.pmask.NBits
13016// Get max # of bits in the bitset
13017// Return max. number of bits supported by array
13018inline int fasttest::pmask_Nbits(fasttest::StrCopyNull& parent) {
13019    return pmask_N(parent) * 32;
13020}
13021
13022// --- fasttest.StrCopyNull.pmask.qGetBit
13023// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
13024inline bool fasttest::pmask_qGetBit(fasttest::StrCopyNull& parent, u32 bit_idx) {
13025    u64 elem_idx = bit_idx >> 5;
13026    u64 shift = bit_idx & 31;
13027    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13028    return bool((elem >> shift) & 1); // extract bit
13029}
13030
13031// --- fasttest.StrCopyNull.pmask.GetBit
13032// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
13033inline bool fasttest::pmask_GetBit(fasttest::StrCopyNull& parent, u32 bit_idx) {
13034    u64 elem_idx = bit_idx >> 5;
13035    u64 shift = bit_idx & 31;
13036    bool ret = false;
13037    u64 lim = pmask_N(parent);
13038    if (elem_idx < lim) {
13039        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13040        ret = (elem >> shift) & 1;                 // extract bit
13041    }
13042    return ret;
13043}
13044
13045// --- fasttest.StrCopyNull.pmask.BitsEmptyQ
13046// Check if all the bits in the bitset are equal to zero
13047inline bool fasttest::pmask_BitsEmptyQ(fasttest::StrCopyNull& parent) {
13048    bool retval = true;
13049    u64 n = pmask_N(parent);
13050    for (u64 i = 0; i < n; i++) {
13051        if (pmask_qFind(parent,i) != 0) {
13052            retval = false;
13053            break;
13054        }
13055    }
13056    return retval;
13057}
13058
13059// --- fasttest.StrCopyNull.pmask.Sum1s
13060inline u64 fasttest::pmask_Sum1s(fasttest::StrCopyNull& parent) {
13061    u64 sum = 0;
13062    u64 n = pmask_N(parent);
13063    for (u64 i = 0; i < n; i++) {
13064        sum += algo::u32_Count1s(pmask_qFind(parent, i));
13065    }
13066    return sum;
13067}
13068
13069// --- fasttest.StrCopyNull.pmask.qClearBit
13070// Clear bit # BIT_IDX in bit set. No bounds checking
13071inline void fasttest::pmask_qClearBit(fasttest::StrCopyNull& parent, u32 bit_idx) {
13072    u64 elem_idx = bit_idx >> 5;
13073    u64 shift = bit_idx & 31;
13074    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13075    elem = elem & ~(u32(1) << shift); // clear bit
13076}
13077
13078// --- fasttest.StrCopyNull.pmask.ClearBit
13079// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
13080inline void fasttest::pmask_ClearBit(fasttest::StrCopyNull& parent, u32 bit_idx) {
13081    u64 elem_idx = bit_idx >> 5;
13082    u64 shift = bit_idx & 31;
13083    u64 lim = pmask_N(parent);
13084    if (elem_idx < lim) {
13085        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13086        elem = elem & ~(u32(1) << shift); // clear bit
13087    }
13088}
13089
13090// --- fasttest.StrCopyNull.pmask.qSetBit
13091// Set bit # BIT_IDX in bit set. No bounds checking
13092inline void fasttest::pmask_qSetBit(fasttest::StrCopyNull& parent, u32 bit_idx) {
13093    u64 elem_idx = bit_idx >> 5;
13094    u64 shift = bit_idx & 31;
13095    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13096    elem = elem | (u32(1) << shift); // set bit
13097}
13098
13099// --- fasttest.StrCopyNull.pmask.SetBit
13100// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
13101inline void fasttest::pmask_SetBit(fasttest::StrCopyNull& parent, u32 bit_idx) {
13102    u64 elem_idx = bit_idx >> 5;
13103    u64 shift = bit_idx & 31;
13104    u64 lim = pmask_N(parent);
13105    if (elem_idx < lim) {
13106        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13107        elem = elem | (u32(1) << shift); // set bit
13108    }
13109}
13110
13111// --- fasttest.StrCopyNull.pmask.qSetBitVal
13112// Set bit # BIT_IDX in bit set. No bounds checking
13113inline void fasttest::pmask_qSetBitVal(fasttest::StrCopyNull& parent, u32 bit_idx, bool val) {
13114    u64 elem_idx = bit_idx >> 5;
13115    u64 shift = bit_idx & 31;
13116    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13117    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
13118}
13119
13120// --- fasttest.StrCopyNull.pmask.qOrBitVal
13121// Or bit # BIT_IDX in bit set. No bounds checking
13122inline void fasttest::pmask_qOrBitVal(fasttest::StrCopyNull& parent, u32 bit_idx, bool val) {
13123    u64 elem_idx = bit_idx >> 5;
13124    u64 shift = bit_idx & 31;
13125    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13126    elem = elem | (u32(val) << shift); // Or in val into elem
13127}
13128
13129// --- fasttest.StrCopyNull.pmask.ClearBitsAll
13130// Set all bits of array to zero.
13131// Note: this does not change what NBits will return.
13132inline void fasttest::pmask_ClearBitsAll(fasttest::StrCopyNull& parent) {
13133    u64 n = pmask_N(parent);
13134    for (u64 i = 0; i < n; i++) {
13135        pmask_qFind(parent, i) = 0;
13136    }
13137}
13138
13139// --- fasttest.StrCopyNull.pmask.ClearBits
13140// Zero in PARENT any bits that are set in RHS.
13141inline void fasttest::pmask_ClearBits(fasttest::StrCopyNull& parent, fasttest::StrCopyNull &rhs) {
13142    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13143    for (u64 i = 0; i < n; i++) {
13144        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
13145    }
13146}
13147
13148// --- fasttest.StrCopyNull.pmask.OrBits
13149// Set PARENT to union of two bitsets.
13150// (This function is not named Set.. to avoid triple entendre).
13151inline void fasttest::pmask_OrBits(fasttest::StrCopyNull& parent, fasttest::StrCopyNull &rhs) {
13152    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13153    for (u64 i = 0; i < n; i++) {
13154        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
13155    }
13156}
13157
13158// --- fasttest.StrCopyNull.pmask.Sup
13159// Return smallest number N such that indexes of all 1 bits are below N
13160inline i32 fasttest::pmask_Sup(fasttest::StrCopyNull& parent) {
13161    u64 lim = pmask_N(parent);
13162    i32 ret = 0;
13163    for (int i = lim-1; i >= 0; i--) {
13164        u32 &val = pmask_qFind(parent, i);
13165        if (val) {
13166            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
13167            ret = i * 32 + bitidx;
13168            break;
13169        }
13170    }
13171    return ret;
13172}
13173
13174// --- fasttest.StrCopyNull.Value57.PresentQ
13175// Return true if the field is marked in the presence mask
13176inline bool fasttest::Value57_PresentQ(fasttest::StrCopyNull& parent) {
13177    return pmask_qGetBit(parent, 0);
13178}
13179
13180// --- fasttest.StrCopyNull.Value57.SetPresent
13181// Set presence bit for this field in the pmask
13182inline void fasttest::Value57_SetPresent(fasttest::StrCopyNull& parent) {
13183    pmask_qSetBit(parent, 0); // mark presence in pmask
13184}
13185
13186// --- fasttest.StrCopyNull.Value57.Present_GetBit
13187// Return field's bit number in the pmask
13188inline int fasttest::Value57_Present_GetBit(fasttest::StrCopyNull& parent) {
13189    int retval = 0;
13190    (void)parent;//only to avoid -Wunused-parameter
13191    return retval;
13192}
13193
13194// --- fasttest.StrCopyNull.Value57.Set
13195inline void fasttest::Value57_Set(fasttest::StrCopyNull& parent, const algo::strptr& rhs) {
13196    parent.Value57 = rhs;
13197    pmask_qSetBit(parent, 0); // mark presence in pmask
13198}
13199
13200// --- fasttest.StrCopyNull.pmask_bitcurs.Reset
13201inline void fasttest::StrCopyNull_pmask_bitcurs_Reset(StrCopyNull_pmask_bitcurs &curs, fasttest::StrCopyNull &parent) {
13202    curs.elems = &pmask_qFind(parent,0);
13203    curs.n_elems = pmask_N(parent);
13204    curs.bit = -1;
13205    StrCopyNull_pmask_bitcurs_Next(curs);
13206}
13207
13208// --- fasttest.StrCopyNull.pmask_bitcurs.ValidQ
13209// cursor points to valid item
13210inline bool fasttest::StrCopyNull_pmask_bitcurs_ValidQ(StrCopyNull_pmask_bitcurs &curs) {
13211    return curs.bit < curs.n_elems*32;
13212}
13213
13214// --- fasttest.StrCopyNull.pmask_bitcurs.Access
13215// item access
13216inline int& fasttest::StrCopyNull_pmask_bitcurs_Access(StrCopyNull_pmask_bitcurs &curs) {
13217    return curs.bit;
13218}
13219
13220// --- fasttest.StrCopyNull..GetMsgLength
13221// Message length (uses length field)
13222inline i32 fasttest::GetMsgLength(const fasttest::StrCopyNull& parent) {
13223    return i32(const_cast<fasttest::StrCopyNull&>(parent).length);
13224}
13225
13226// --- fasttest.StrCopyNull..GetMsgMemptr
13227// Memptr encompassing the message (uses length field)
13228inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrCopyNull& row) {
13229    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrCopyNull&>(row).length));
13230}
13231
13232// --- fasttest.StrCopyNull..Init
13233// Set all fields to initial values.
13234inline void fasttest::StrCopyNull_Init(fasttest::StrCopyNull& parent) {
13235    parent.length = u32(ssizeof(parent) + (0));
13236    parent.id = u32(57);
13237    parent.pmask = u32(0);
13238}
13239inline fasttest::StrCopyOpt::StrCopyOpt() {
13240    fasttest::StrCopyOpt_Init(*this);
13241}
13242
13243
13244// --- fasttest.StrCopyOpt.base.Castdown
13245// Check if fasttest::TemplateHeader is an instance of StrCopyOpt by checking the type field
13246// If it is, return the pointer of target type.
13247// Additionally, check if the length field permits valid instance of StrCopyOpt.
13248// If not successful, quietly return NULL.
13249inline fasttest::StrCopyOpt* fasttest::StrCopyOpt_Castdown(fasttest::TemplateHeader &hdr) {
13250    bool cond = hdr.id == (56);
13251    cond &= i32(hdr.length) >= ssizeof(fasttest::StrCopyOpt);
13252    return cond ? reinterpret_cast<fasttest::StrCopyOpt*>(&hdr) : NULL;
13253}
13254
13255// --- fasttest.StrCopyOpt.base.Castbase
13256inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrCopyOpt& parent) {
13257    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
13258}
13259
13260// --- fasttest.StrCopyOpt.pmask.N
13261// Return constant 1
13262inline int fasttest::pmask_N(fasttest::StrCopyOpt& parent) {
13263    (void)parent;
13264    return 1;
13265}
13266
13267// --- fasttest.StrCopyOpt.pmask.qFind
13268// Access value
13269inline u32& fasttest::pmask_qFind(fasttest::StrCopyOpt& parent, int) {
13270    return parent.pmask;
13271}
13272
13273// --- fasttest.StrCopyOpt.pmask.NBits
13274// Get max # of bits in the bitset
13275// Return max. number of bits supported by array
13276inline int fasttest::pmask_Nbits(fasttest::StrCopyOpt& parent) {
13277    return pmask_N(parent) * 32;
13278}
13279
13280// --- fasttest.StrCopyOpt.pmask.qGetBit
13281// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
13282inline bool fasttest::pmask_qGetBit(fasttest::StrCopyOpt& parent, u32 bit_idx) {
13283    u64 elem_idx = bit_idx >> 5;
13284    u64 shift = bit_idx & 31;
13285    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13286    return bool((elem >> shift) & 1); // extract bit
13287}
13288
13289// --- fasttest.StrCopyOpt.pmask.GetBit
13290// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
13291inline bool fasttest::pmask_GetBit(fasttest::StrCopyOpt& parent, u32 bit_idx) {
13292    u64 elem_idx = bit_idx >> 5;
13293    u64 shift = bit_idx & 31;
13294    bool ret = false;
13295    u64 lim = pmask_N(parent);
13296    if (elem_idx < lim) {
13297        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13298        ret = (elem >> shift) & 1;                 // extract bit
13299    }
13300    return ret;
13301}
13302
13303// --- fasttest.StrCopyOpt.pmask.BitsEmptyQ
13304// Check if all the bits in the bitset are equal to zero
13305inline bool fasttest::pmask_BitsEmptyQ(fasttest::StrCopyOpt& parent) {
13306    bool retval = true;
13307    u64 n = pmask_N(parent);
13308    for (u64 i = 0; i < n; i++) {
13309        if (pmask_qFind(parent,i) != 0) {
13310            retval = false;
13311            break;
13312        }
13313    }
13314    return retval;
13315}
13316
13317// --- fasttest.StrCopyOpt.pmask.Sum1s
13318inline u64 fasttest::pmask_Sum1s(fasttest::StrCopyOpt& parent) {
13319    u64 sum = 0;
13320    u64 n = pmask_N(parent);
13321    for (u64 i = 0; i < n; i++) {
13322        sum += algo::u32_Count1s(pmask_qFind(parent, i));
13323    }
13324    return sum;
13325}
13326
13327// --- fasttest.StrCopyOpt.pmask.qClearBit
13328// Clear bit # BIT_IDX in bit set. No bounds checking
13329inline void fasttest::pmask_qClearBit(fasttest::StrCopyOpt& parent, u32 bit_idx) {
13330    u64 elem_idx = bit_idx >> 5;
13331    u64 shift = bit_idx & 31;
13332    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13333    elem = elem & ~(u32(1) << shift); // clear bit
13334}
13335
13336// --- fasttest.StrCopyOpt.pmask.ClearBit
13337// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
13338inline void fasttest::pmask_ClearBit(fasttest::StrCopyOpt& parent, u32 bit_idx) {
13339    u64 elem_idx = bit_idx >> 5;
13340    u64 shift = bit_idx & 31;
13341    u64 lim = pmask_N(parent);
13342    if (elem_idx < lim) {
13343        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13344        elem = elem & ~(u32(1) << shift); // clear bit
13345    }
13346}
13347
13348// --- fasttest.StrCopyOpt.pmask.qSetBit
13349// Set bit # BIT_IDX in bit set. No bounds checking
13350inline void fasttest::pmask_qSetBit(fasttest::StrCopyOpt& parent, u32 bit_idx) {
13351    u64 elem_idx = bit_idx >> 5;
13352    u64 shift = bit_idx & 31;
13353    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13354    elem = elem | (u32(1) << shift); // set bit
13355}
13356
13357// --- fasttest.StrCopyOpt.pmask.SetBit
13358// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
13359inline void fasttest::pmask_SetBit(fasttest::StrCopyOpt& parent, u32 bit_idx) {
13360    u64 elem_idx = bit_idx >> 5;
13361    u64 shift = bit_idx & 31;
13362    u64 lim = pmask_N(parent);
13363    if (elem_idx < lim) {
13364        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13365        elem = elem | (u32(1) << shift); // set bit
13366    }
13367}
13368
13369// --- fasttest.StrCopyOpt.pmask.qSetBitVal
13370// Set bit # BIT_IDX in bit set. No bounds checking
13371inline void fasttest::pmask_qSetBitVal(fasttest::StrCopyOpt& parent, u32 bit_idx, bool val) {
13372    u64 elem_idx = bit_idx >> 5;
13373    u64 shift = bit_idx & 31;
13374    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13375    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
13376}
13377
13378// --- fasttest.StrCopyOpt.pmask.qOrBitVal
13379// Or bit # BIT_IDX in bit set. No bounds checking
13380inline void fasttest::pmask_qOrBitVal(fasttest::StrCopyOpt& parent, u32 bit_idx, bool val) {
13381    u64 elem_idx = bit_idx >> 5;
13382    u64 shift = bit_idx & 31;
13383    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13384    elem = elem | (u32(val) << shift); // Or in val into elem
13385}
13386
13387// --- fasttest.StrCopyOpt.pmask.ClearBitsAll
13388// Set all bits of array to zero.
13389// Note: this does not change what NBits will return.
13390inline void fasttest::pmask_ClearBitsAll(fasttest::StrCopyOpt& parent) {
13391    u64 n = pmask_N(parent);
13392    for (u64 i = 0; i < n; i++) {
13393        pmask_qFind(parent, i) = 0;
13394    }
13395}
13396
13397// --- fasttest.StrCopyOpt.pmask.ClearBits
13398// Zero in PARENT any bits that are set in RHS.
13399inline void fasttest::pmask_ClearBits(fasttest::StrCopyOpt& parent, fasttest::StrCopyOpt &rhs) {
13400    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13401    for (u64 i = 0; i < n; i++) {
13402        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
13403    }
13404}
13405
13406// --- fasttest.StrCopyOpt.pmask.OrBits
13407// Set PARENT to union of two bitsets.
13408// (This function is not named Set.. to avoid triple entendre).
13409inline void fasttest::pmask_OrBits(fasttest::StrCopyOpt& parent, fasttest::StrCopyOpt &rhs) {
13410    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13411    for (u64 i = 0; i < n; i++) {
13412        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
13413    }
13414}
13415
13416// --- fasttest.StrCopyOpt.pmask.Sup
13417// Return smallest number N such that indexes of all 1 bits are below N
13418inline i32 fasttest::pmask_Sup(fasttest::StrCopyOpt& parent) {
13419    u64 lim = pmask_N(parent);
13420    i32 ret = 0;
13421    for (int i = lim-1; i >= 0; i--) {
13422        u32 &val = pmask_qFind(parent, i);
13423        if (val) {
13424            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
13425            ret = i * 32 + bitidx;
13426            break;
13427        }
13428    }
13429    return ret;
13430}
13431
13432// --- fasttest.StrCopyOpt.Value56.PresentQ
13433// Return true if the field is marked in the presence mask
13434inline bool fasttest::Value56_PresentQ(fasttest::StrCopyOpt& parent) {
13435    return pmask_qGetBit(parent, 0);
13436}
13437
13438// --- fasttest.StrCopyOpt.Value56.SetPresent
13439// Set presence bit for this field in the pmask
13440inline void fasttest::Value56_SetPresent(fasttest::StrCopyOpt& parent) {
13441    pmask_qSetBit(parent, 0); // mark presence in pmask
13442}
13443
13444// --- fasttest.StrCopyOpt.Value56.Present_GetBit
13445// Return field's bit number in the pmask
13446inline int fasttest::Value56_Present_GetBit(fasttest::StrCopyOpt& parent) {
13447    int retval = 0;
13448    (void)parent;//only to avoid -Wunused-parameter
13449    return retval;
13450}
13451
13452// --- fasttest.StrCopyOpt.Value56.Set
13453inline void fasttest::Value56_Set(fasttest::StrCopyOpt& parent, const algo::strptr& rhs) {
13454    parent.Value56 = rhs;
13455    pmask_qSetBit(parent, 0); // mark presence in pmask
13456}
13457
13458// --- fasttest.StrCopyOpt.pmask_bitcurs.Reset
13459inline void fasttest::StrCopyOpt_pmask_bitcurs_Reset(StrCopyOpt_pmask_bitcurs &curs, fasttest::StrCopyOpt &parent) {
13460    curs.elems = &pmask_qFind(parent,0);
13461    curs.n_elems = pmask_N(parent);
13462    curs.bit = -1;
13463    StrCopyOpt_pmask_bitcurs_Next(curs);
13464}
13465
13466// --- fasttest.StrCopyOpt.pmask_bitcurs.ValidQ
13467// cursor points to valid item
13468inline bool fasttest::StrCopyOpt_pmask_bitcurs_ValidQ(StrCopyOpt_pmask_bitcurs &curs) {
13469    return curs.bit < curs.n_elems*32;
13470}
13471
13472// --- fasttest.StrCopyOpt.pmask_bitcurs.Access
13473// item access
13474inline int& fasttest::StrCopyOpt_pmask_bitcurs_Access(StrCopyOpt_pmask_bitcurs &curs) {
13475    return curs.bit;
13476}
13477
13478// --- fasttest.StrCopyOpt..GetMsgLength
13479// Message length (uses length field)
13480inline i32 fasttest::GetMsgLength(const fasttest::StrCopyOpt& parent) {
13481    return i32(const_cast<fasttest::StrCopyOpt&>(parent).length);
13482}
13483
13484// --- fasttest.StrCopyOpt..GetMsgMemptr
13485// Memptr encompassing the message (uses length field)
13486inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrCopyOpt& row) {
13487    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrCopyOpt&>(row).length));
13488}
13489
13490// --- fasttest.StrCopyOpt..Init
13491// Set all fields to initial values.
13492inline void fasttest::StrCopyOpt_Init(fasttest::StrCopyOpt& parent) {
13493    parent.length = u32(ssizeof(parent) + (0));
13494    parent.id = u32(56);
13495    parent.pmask = u32(0);
13496    parent.Value56 = algo::strptr("A56");
13497}
13498inline fasttest::StrDflt::StrDflt() {
13499    fasttest::StrDflt_Init(*this);
13500}
13501
13502
13503// --- fasttest.StrDflt.base.Castdown
13504// Check if fasttest::TemplateHeader is an instance of StrDflt by checking the type field
13505// If it is, return the pointer of target type.
13506// Additionally, check if the length field permits valid instance of StrDflt.
13507// If not successful, quietly return NULL.
13508inline fasttest::StrDflt* fasttest::StrDflt_Castdown(fasttest::TemplateHeader &hdr) {
13509    bool cond = hdr.id == (39);
13510    cond &= i32(hdr.length) >= ssizeof(fasttest::StrDflt);
13511    return cond ? reinterpret_cast<fasttest::StrDflt*>(&hdr) : NULL;
13512}
13513
13514// --- fasttest.StrDflt.base.Castbase
13515inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrDflt& parent) {
13516    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
13517}
13518
13519// --- fasttest.StrDflt..GetMsgLength
13520// Message length (uses length field)
13521inline i32 fasttest::GetMsgLength(const fasttest::StrDflt& parent) {
13522    return i32(const_cast<fasttest::StrDflt&>(parent).length);
13523}
13524
13525// --- fasttest.StrDflt..GetMsgMemptr
13526// Memptr encompassing the message (uses length field)
13527inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrDflt& row) {
13528    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrDflt&>(row).length));
13529}
13530
13531// --- fasttest.StrDflt..Init
13532// Set all fields to initial values.
13533inline void fasttest::StrDflt_Init(fasttest::StrDflt& parent) {
13534    parent.length = u32(ssizeof(parent) + (0));
13535    parent.id = u32(39);
13536    parent.Value = algo::strptr("A39");
13537}
13538inline fasttest::StrDfltNull::StrDfltNull() {
13539    fasttest::StrDfltNull_Init(*this);
13540}
13541
13542
13543// --- fasttest.StrDfltNull.base.Castdown
13544// Check if fasttest::TemplateHeader is an instance of StrDfltNull by checking the type field
13545// If it is, return the pointer of target type.
13546// Additionally, check if the length field permits valid instance of StrDfltNull.
13547// If not successful, quietly return NULL.
13548inline fasttest::StrDfltNull* fasttest::StrDfltNull_Castdown(fasttest::TemplateHeader &hdr) {
13549    bool cond = hdr.id == (41);
13550    cond &= i32(hdr.length) >= ssizeof(fasttest::StrDfltNull);
13551    return cond ? reinterpret_cast<fasttest::StrDfltNull*>(&hdr) : NULL;
13552}
13553
13554// --- fasttest.StrDfltNull.base.Castbase
13555inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrDfltNull& parent) {
13556    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
13557}
13558
13559// --- fasttest.StrDfltNull.pmask.N
13560// Return constant 1
13561inline int fasttest::pmask_N(fasttest::StrDfltNull& parent) {
13562    (void)parent;
13563    return 1;
13564}
13565
13566// --- fasttest.StrDfltNull.pmask.qFind
13567// Access value
13568inline u32& fasttest::pmask_qFind(fasttest::StrDfltNull& parent, int) {
13569    return parent.pmask;
13570}
13571
13572// --- fasttest.StrDfltNull.pmask.NBits
13573// Get max # of bits in the bitset
13574// Return max. number of bits supported by array
13575inline int fasttest::pmask_Nbits(fasttest::StrDfltNull& parent) {
13576    return pmask_N(parent) * 32;
13577}
13578
13579// --- fasttest.StrDfltNull.pmask.qGetBit
13580// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
13581inline bool fasttest::pmask_qGetBit(fasttest::StrDfltNull& parent, u32 bit_idx) {
13582    u64 elem_idx = bit_idx >> 5;
13583    u64 shift = bit_idx & 31;
13584    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13585    return bool((elem >> shift) & 1); // extract bit
13586}
13587
13588// --- fasttest.StrDfltNull.pmask.GetBit
13589// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
13590inline bool fasttest::pmask_GetBit(fasttest::StrDfltNull& parent, u32 bit_idx) {
13591    u64 elem_idx = bit_idx >> 5;
13592    u64 shift = bit_idx & 31;
13593    bool ret = false;
13594    u64 lim = pmask_N(parent);
13595    if (elem_idx < lim) {
13596        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13597        ret = (elem >> shift) & 1;                 // extract bit
13598    }
13599    return ret;
13600}
13601
13602// --- fasttest.StrDfltNull.pmask.BitsEmptyQ
13603// Check if all the bits in the bitset are equal to zero
13604inline bool fasttest::pmask_BitsEmptyQ(fasttest::StrDfltNull& parent) {
13605    bool retval = true;
13606    u64 n = pmask_N(parent);
13607    for (u64 i = 0; i < n; i++) {
13608        if (pmask_qFind(parent,i) != 0) {
13609            retval = false;
13610            break;
13611        }
13612    }
13613    return retval;
13614}
13615
13616// --- fasttest.StrDfltNull.pmask.Sum1s
13617inline u64 fasttest::pmask_Sum1s(fasttest::StrDfltNull& parent) {
13618    u64 sum = 0;
13619    u64 n = pmask_N(parent);
13620    for (u64 i = 0; i < n; i++) {
13621        sum += algo::u32_Count1s(pmask_qFind(parent, i));
13622    }
13623    return sum;
13624}
13625
13626// --- fasttest.StrDfltNull.pmask.qClearBit
13627// Clear bit # BIT_IDX in bit set. No bounds checking
13628inline void fasttest::pmask_qClearBit(fasttest::StrDfltNull& parent, u32 bit_idx) {
13629    u64 elem_idx = bit_idx >> 5;
13630    u64 shift = bit_idx & 31;
13631    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13632    elem = elem & ~(u32(1) << shift); // clear bit
13633}
13634
13635// --- fasttest.StrDfltNull.pmask.ClearBit
13636// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
13637inline void fasttest::pmask_ClearBit(fasttest::StrDfltNull& parent, u32 bit_idx) {
13638    u64 elem_idx = bit_idx >> 5;
13639    u64 shift = bit_idx & 31;
13640    u64 lim = pmask_N(parent);
13641    if (elem_idx < lim) {
13642        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13643        elem = elem & ~(u32(1) << shift); // clear bit
13644    }
13645}
13646
13647// --- fasttest.StrDfltNull.pmask.qSetBit
13648// Set bit # BIT_IDX in bit set. No bounds checking
13649inline void fasttest::pmask_qSetBit(fasttest::StrDfltNull& parent, u32 bit_idx) {
13650    u64 elem_idx = bit_idx >> 5;
13651    u64 shift = bit_idx & 31;
13652    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13653    elem = elem | (u32(1) << shift); // set bit
13654}
13655
13656// --- fasttest.StrDfltNull.pmask.SetBit
13657// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
13658inline void fasttest::pmask_SetBit(fasttest::StrDfltNull& parent, u32 bit_idx) {
13659    u64 elem_idx = bit_idx >> 5;
13660    u64 shift = bit_idx & 31;
13661    u64 lim = pmask_N(parent);
13662    if (elem_idx < lim) {
13663        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13664        elem = elem | (u32(1) << shift); // set bit
13665    }
13666}
13667
13668// --- fasttest.StrDfltNull.pmask.qSetBitVal
13669// Set bit # BIT_IDX in bit set. No bounds checking
13670inline void fasttest::pmask_qSetBitVal(fasttest::StrDfltNull& parent, u32 bit_idx, bool val) {
13671    u64 elem_idx = bit_idx >> 5;
13672    u64 shift = bit_idx & 31;
13673    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13674    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
13675}
13676
13677// --- fasttest.StrDfltNull.pmask.qOrBitVal
13678// Or bit # BIT_IDX in bit set. No bounds checking
13679inline void fasttest::pmask_qOrBitVal(fasttest::StrDfltNull& parent, u32 bit_idx, bool val) {
13680    u64 elem_idx = bit_idx >> 5;
13681    u64 shift = bit_idx & 31;
13682    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13683    elem = elem | (u32(val) << shift); // Or in val into elem
13684}
13685
13686// --- fasttest.StrDfltNull.pmask.ClearBitsAll
13687// Set all bits of array to zero.
13688// Note: this does not change what NBits will return.
13689inline void fasttest::pmask_ClearBitsAll(fasttest::StrDfltNull& parent) {
13690    u64 n = pmask_N(parent);
13691    for (u64 i = 0; i < n; i++) {
13692        pmask_qFind(parent, i) = 0;
13693    }
13694}
13695
13696// --- fasttest.StrDfltNull.pmask.ClearBits
13697// Zero in PARENT any bits that are set in RHS.
13698inline void fasttest::pmask_ClearBits(fasttest::StrDfltNull& parent, fasttest::StrDfltNull &rhs) {
13699    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13700    for (u64 i = 0; i < n; i++) {
13701        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
13702    }
13703}
13704
13705// --- fasttest.StrDfltNull.pmask.OrBits
13706// Set PARENT to union of two bitsets.
13707// (This function is not named Set.. to avoid triple entendre).
13708inline void fasttest::pmask_OrBits(fasttest::StrDfltNull& parent, fasttest::StrDfltNull &rhs) {
13709    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13710    for (u64 i = 0; i < n; i++) {
13711        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
13712    }
13713}
13714
13715// --- fasttest.StrDfltNull.pmask.Sup
13716// Return smallest number N such that indexes of all 1 bits are below N
13717inline i32 fasttest::pmask_Sup(fasttest::StrDfltNull& parent) {
13718    u64 lim = pmask_N(parent);
13719    i32 ret = 0;
13720    for (int i = lim-1; i >= 0; i--) {
13721        u32 &val = pmask_qFind(parent, i);
13722        if (val) {
13723            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
13724            ret = i * 32 + bitidx;
13725            break;
13726        }
13727    }
13728    return ret;
13729}
13730
13731// --- fasttest.StrDfltNull.Value.PresentQ
13732// Return true if the field is marked in the presence mask
13733inline bool fasttest::Value_PresentQ(fasttest::StrDfltNull& parent) {
13734    return pmask_qGetBit(parent, 0);
13735}
13736
13737// --- fasttest.StrDfltNull.Value.SetPresent
13738// Set presence bit for this field in the pmask
13739inline void fasttest::Value_SetPresent(fasttest::StrDfltNull& parent) {
13740    pmask_qSetBit(parent, 0); // mark presence in pmask
13741}
13742
13743// --- fasttest.StrDfltNull.Value.Present_GetBit
13744// Return field's bit number in the pmask
13745inline int fasttest::Value_Present_GetBit(fasttest::StrDfltNull& parent) {
13746    int retval = 0;
13747    (void)parent;//only to avoid -Wunused-parameter
13748    return retval;
13749}
13750
13751// --- fasttest.StrDfltNull.Value.Set
13752inline void fasttest::Value_Set(fasttest::StrDfltNull& parent, const algo::strptr& rhs) {
13753    parent.Value = rhs;
13754    pmask_qSetBit(parent, 0); // mark presence in pmask
13755}
13756
13757// --- fasttest.StrDfltNull.pmask_bitcurs.Reset
13758inline void fasttest::StrDfltNull_pmask_bitcurs_Reset(StrDfltNull_pmask_bitcurs &curs, fasttest::StrDfltNull &parent) {
13759    curs.elems = &pmask_qFind(parent,0);
13760    curs.n_elems = pmask_N(parent);
13761    curs.bit = -1;
13762    StrDfltNull_pmask_bitcurs_Next(curs);
13763}
13764
13765// --- fasttest.StrDfltNull.pmask_bitcurs.ValidQ
13766// cursor points to valid item
13767inline bool fasttest::StrDfltNull_pmask_bitcurs_ValidQ(StrDfltNull_pmask_bitcurs &curs) {
13768    return curs.bit < curs.n_elems*32;
13769}
13770
13771// --- fasttest.StrDfltNull.pmask_bitcurs.Access
13772// item access
13773inline int& fasttest::StrDfltNull_pmask_bitcurs_Access(StrDfltNull_pmask_bitcurs &curs) {
13774    return curs.bit;
13775}
13776
13777// --- fasttest.StrDfltNull..GetMsgLength
13778// Message length (uses length field)
13779inline i32 fasttest::GetMsgLength(const fasttest::StrDfltNull& parent) {
13780    return i32(const_cast<fasttest::StrDfltNull&>(parent).length);
13781}
13782
13783// --- fasttest.StrDfltNull..GetMsgMemptr
13784// Memptr encompassing the message (uses length field)
13785inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrDfltNull& row) {
13786    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrDfltNull&>(row).length));
13787}
13788
13789// --- fasttest.StrDfltNull..Init
13790// Set all fields to initial values.
13791inline void fasttest::StrDfltNull_Init(fasttest::StrDfltNull& parent) {
13792    parent.length = u32(ssizeof(parent) + (0));
13793    parent.id = u32(41);
13794    parent.pmask = u32(0);
13795}
13796inline fasttest::StrDfltOpt::StrDfltOpt() {
13797    fasttest::StrDfltOpt_Init(*this);
13798}
13799
13800
13801// --- fasttest.StrDfltOpt.base.Castdown
13802// Check if fasttest::TemplateHeader is an instance of StrDfltOpt by checking the type field
13803// If it is, return the pointer of target type.
13804// Additionally, check if the length field permits valid instance of StrDfltOpt.
13805// If not successful, quietly return NULL.
13806inline fasttest::StrDfltOpt* fasttest::StrDfltOpt_Castdown(fasttest::TemplateHeader &hdr) {
13807    bool cond = hdr.id == (40);
13808    cond &= i32(hdr.length) >= ssizeof(fasttest::StrDfltOpt);
13809    return cond ? reinterpret_cast<fasttest::StrDfltOpt*>(&hdr) : NULL;
13810}
13811
13812// --- fasttest.StrDfltOpt.base.Castbase
13813inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrDfltOpt& parent) {
13814    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
13815}
13816
13817// --- fasttest.StrDfltOpt.pmask.N
13818// Return constant 1
13819inline int fasttest::pmask_N(fasttest::StrDfltOpt& parent) {
13820    (void)parent;
13821    return 1;
13822}
13823
13824// --- fasttest.StrDfltOpt.pmask.qFind
13825// Access value
13826inline u32& fasttest::pmask_qFind(fasttest::StrDfltOpt& parent, int) {
13827    return parent.pmask;
13828}
13829
13830// --- fasttest.StrDfltOpt.pmask.NBits
13831// Get max # of bits in the bitset
13832// Return max. number of bits supported by array
13833inline int fasttest::pmask_Nbits(fasttest::StrDfltOpt& parent) {
13834    return pmask_N(parent) * 32;
13835}
13836
13837// --- fasttest.StrDfltOpt.pmask.qGetBit
13838// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
13839inline bool fasttest::pmask_qGetBit(fasttest::StrDfltOpt& parent, u32 bit_idx) {
13840    u64 elem_idx = bit_idx >> 5;
13841    u64 shift = bit_idx & 31;
13842    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13843    return bool((elem >> shift) & 1); // extract bit
13844}
13845
13846// --- fasttest.StrDfltOpt.pmask.GetBit
13847// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
13848inline bool fasttest::pmask_GetBit(fasttest::StrDfltOpt& parent, u32 bit_idx) {
13849    u64 elem_idx = bit_idx >> 5;
13850    u64 shift = bit_idx & 31;
13851    bool ret = false;
13852    u64 lim = pmask_N(parent);
13853    if (elem_idx < lim) {
13854        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
13855        ret = (elem >> shift) & 1;                 // extract bit
13856    }
13857    return ret;
13858}
13859
13860// --- fasttest.StrDfltOpt.pmask.BitsEmptyQ
13861// Check if all the bits in the bitset are equal to zero
13862inline bool fasttest::pmask_BitsEmptyQ(fasttest::StrDfltOpt& parent) {
13863    bool retval = true;
13864    u64 n = pmask_N(parent);
13865    for (u64 i = 0; i < n; i++) {
13866        if (pmask_qFind(parent,i) != 0) {
13867            retval = false;
13868            break;
13869        }
13870    }
13871    return retval;
13872}
13873
13874// --- fasttest.StrDfltOpt.pmask.Sum1s
13875inline u64 fasttest::pmask_Sum1s(fasttest::StrDfltOpt& parent) {
13876    u64 sum = 0;
13877    u64 n = pmask_N(parent);
13878    for (u64 i = 0; i < n; i++) {
13879        sum += algo::u32_Count1s(pmask_qFind(parent, i));
13880    }
13881    return sum;
13882}
13883
13884// --- fasttest.StrDfltOpt.pmask.qClearBit
13885// Clear bit # BIT_IDX in bit set. No bounds checking
13886inline void fasttest::pmask_qClearBit(fasttest::StrDfltOpt& parent, u32 bit_idx) {
13887    u64 elem_idx = bit_idx >> 5;
13888    u64 shift = bit_idx & 31;
13889    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13890    elem = elem & ~(u32(1) << shift); // clear bit
13891}
13892
13893// --- fasttest.StrDfltOpt.pmask.ClearBit
13894// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
13895inline void fasttest::pmask_ClearBit(fasttest::StrDfltOpt& parent, u32 bit_idx) {
13896    u64 elem_idx = bit_idx >> 5;
13897    u64 shift = bit_idx & 31;
13898    u64 lim = pmask_N(parent);
13899    if (elem_idx < lim) {
13900        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13901        elem = elem & ~(u32(1) << shift); // clear bit
13902    }
13903}
13904
13905// --- fasttest.StrDfltOpt.pmask.qSetBit
13906// Set bit # BIT_IDX in bit set. No bounds checking
13907inline void fasttest::pmask_qSetBit(fasttest::StrDfltOpt& parent, u32 bit_idx) {
13908    u64 elem_idx = bit_idx >> 5;
13909    u64 shift = bit_idx & 31;
13910    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13911    elem = elem | (u32(1) << shift); // set bit
13912}
13913
13914// --- fasttest.StrDfltOpt.pmask.SetBit
13915// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
13916inline void fasttest::pmask_SetBit(fasttest::StrDfltOpt& parent, u32 bit_idx) {
13917    u64 elem_idx = bit_idx >> 5;
13918    u64 shift = bit_idx & 31;
13919    u64 lim = pmask_N(parent);
13920    if (elem_idx < lim) {
13921        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13922        elem = elem | (u32(1) << shift); // set bit
13923    }
13924}
13925
13926// --- fasttest.StrDfltOpt.pmask.qSetBitVal
13927// Set bit # BIT_IDX in bit set. No bounds checking
13928inline void fasttest::pmask_qSetBitVal(fasttest::StrDfltOpt& parent, u32 bit_idx, bool val) {
13929    u64 elem_idx = bit_idx >> 5;
13930    u64 shift = bit_idx & 31;
13931    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13932    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
13933}
13934
13935// --- fasttest.StrDfltOpt.pmask.qOrBitVal
13936// Or bit # BIT_IDX in bit set. No bounds checking
13937inline void fasttest::pmask_qOrBitVal(fasttest::StrDfltOpt& parent, u32 bit_idx, bool val) {
13938    u64 elem_idx = bit_idx >> 5;
13939    u64 shift = bit_idx & 31;
13940    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
13941    elem = elem | (u32(val) << shift); // Or in val into elem
13942}
13943
13944// --- fasttest.StrDfltOpt.pmask.ClearBitsAll
13945// Set all bits of array to zero.
13946// Note: this does not change what NBits will return.
13947inline void fasttest::pmask_ClearBitsAll(fasttest::StrDfltOpt& parent) {
13948    u64 n = pmask_N(parent);
13949    for (u64 i = 0; i < n; i++) {
13950        pmask_qFind(parent, i) = 0;
13951    }
13952}
13953
13954// --- fasttest.StrDfltOpt.pmask.ClearBits
13955// Zero in PARENT any bits that are set in RHS.
13956inline void fasttest::pmask_ClearBits(fasttest::StrDfltOpt& parent, fasttest::StrDfltOpt &rhs) {
13957    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13958    for (u64 i = 0; i < n; i++) {
13959        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
13960    }
13961}
13962
13963// --- fasttest.StrDfltOpt.pmask.OrBits
13964// Set PARENT to union of two bitsets.
13965// (This function is not named Set.. to avoid triple entendre).
13966inline void fasttest::pmask_OrBits(fasttest::StrDfltOpt& parent, fasttest::StrDfltOpt &rhs) {
13967    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
13968    for (u64 i = 0; i < n; i++) {
13969        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
13970    }
13971}
13972
13973// --- fasttest.StrDfltOpt.pmask.Sup
13974// Return smallest number N such that indexes of all 1 bits are below N
13975inline i32 fasttest::pmask_Sup(fasttest::StrDfltOpt& parent) {
13976    u64 lim = pmask_N(parent);
13977    i32 ret = 0;
13978    for (int i = lim-1; i >= 0; i--) {
13979        u32 &val = pmask_qFind(parent, i);
13980        if (val) {
13981            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
13982            ret = i * 32 + bitidx;
13983            break;
13984        }
13985    }
13986    return ret;
13987}
13988
13989// --- fasttest.StrDfltOpt.Value.PresentQ
13990// Return true if the field is marked in the presence mask
13991inline bool fasttest::Value_PresentQ(fasttest::StrDfltOpt& parent) {
13992    return pmask_qGetBit(parent, 0);
13993}
13994
13995// --- fasttest.StrDfltOpt.Value.SetPresent
13996// Set presence bit for this field in the pmask
13997inline void fasttest::Value_SetPresent(fasttest::StrDfltOpt& parent) {
13998    pmask_qSetBit(parent, 0); // mark presence in pmask
13999}
14000
14001// --- fasttest.StrDfltOpt.Value.Present_GetBit
14002// Return field's bit number in the pmask
14003inline int fasttest::Value_Present_GetBit(fasttest::StrDfltOpt& parent) {
14004    int retval = 0;
14005    (void)parent;//only to avoid -Wunused-parameter
14006    return retval;
14007}
14008
14009// --- fasttest.StrDfltOpt.Value.Set
14010inline void fasttest::Value_Set(fasttest::StrDfltOpt& parent, const algo::strptr& rhs) {
14011    parent.Value = rhs;
14012    pmask_qSetBit(parent, 0); // mark presence in pmask
14013}
14014
14015// --- fasttest.StrDfltOpt.pmask_bitcurs.Reset
14016inline void fasttest::StrDfltOpt_pmask_bitcurs_Reset(StrDfltOpt_pmask_bitcurs &curs, fasttest::StrDfltOpt &parent) {
14017    curs.elems = &pmask_qFind(parent,0);
14018    curs.n_elems = pmask_N(parent);
14019    curs.bit = -1;
14020    StrDfltOpt_pmask_bitcurs_Next(curs);
14021}
14022
14023// --- fasttest.StrDfltOpt.pmask_bitcurs.ValidQ
14024// cursor points to valid item
14025inline bool fasttest::StrDfltOpt_pmask_bitcurs_ValidQ(StrDfltOpt_pmask_bitcurs &curs) {
14026    return curs.bit < curs.n_elems*32;
14027}
14028
14029// --- fasttest.StrDfltOpt.pmask_bitcurs.Access
14030// item access
14031inline int& fasttest::StrDfltOpt_pmask_bitcurs_Access(StrDfltOpt_pmask_bitcurs &curs) {
14032    return curs.bit;
14033}
14034
14035// --- fasttest.StrDfltOpt..GetMsgLength
14036// Message length (uses length field)
14037inline i32 fasttest::GetMsgLength(const fasttest::StrDfltOpt& parent) {
14038    return i32(const_cast<fasttest::StrDfltOpt&>(parent).length);
14039}
14040
14041// --- fasttest.StrDfltOpt..GetMsgMemptr
14042// Memptr encompassing the message (uses length field)
14043inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrDfltOpt& row) {
14044    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrDfltOpt&>(row).length));
14045}
14046
14047// --- fasttest.StrDfltOpt..Init
14048// Set all fields to initial values.
14049inline void fasttest::StrDfltOpt_Init(fasttest::StrDfltOpt& parent) {
14050    parent.length = u32(ssizeof(parent) + (0));
14051    parent.id = u32(40);
14052    parent.pmask = u32(0);
14053    parent.Value = algo::strptr("A40");
14054}
14055inline fasttest::StrNone::StrNone() {
14056    fasttest::StrNone_Init(*this);
14057}
14058
14059
14060// --- fasttest.StrNone.base.Castdown
14061// Check if fasttest::TemplateHeader is an instance of StrNone by checking the type field
14062// If it is, return the pointer of target type.
14063// Additionally, check if the length field permits valid instance of StrNone.
14064// If not successful, quietly return NULL.
14065inline fasttest::StrNone* fasttest::StrNone_Castdown(fasttest::TemplateHeader &hdr) {
14066    bool cond = hdr.id == (5);
14067    cond &= i32(hdr.length) >= ssizeof(fasttest::StrNone);
14068    return cond ? reinterpret_cast<fasttest::StrNone*>(&hdr) : NULL;
14069}
14070
14071// --- fasttest.StrNone.base.Castbase
14072inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrNone& parent) {
14073    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
14074}
14075
14076// --- fasttest.StrNone..GetMsgLength
14077// Message length (uses length field)
14078inline i32 fasttest::GetMsgLength(const fasttest::StrNone& parent) {
14079    return i32(const_cast<fasttest::StrNone&>(parent).length);
14080}
14081
14082// --- fasttest.StrNone..GetMsgMemptr
14083// Memptr encompassing the message (uses length field)
14084inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrNone& row) {
14085    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrNone&>(row).length));
14086}
14087
14088// --- fasttest.StrNone..Init
14089// Set all fields to initial values.
14090inline void fasttest::StrNone_Init(fasttest::StrNone& parent) {
14091    parent.length = u32(ssizeof(parent) + (0));
14092    parent.id = u32(5);
14093}
14094inline fasttest::StrNoneOpt::StrNoneOpt() {
14095    fasttest::StrNoneOpt_Init(*this);
14096}
14097
14098
14099// --- fasttest.StrNoneOpt.base.Castdown
14100// Check if fasttest::TemplateHeader is an instance of StrNoneOpt by checking the type field
14101// If it is, return the pointer of target type.
14102// Additionally, check if the length field permits valid instance of StrNoneOpt.
14103// If not successful, quietly return NULL.
14104inline fasttest::StrNoneOpt* fasttest::StrNoneOpt_Castdown(fasttest::TemplateHeader &hdr) {
14105    bool cond = hdr.id == (6);
14106    cond &= i32(hdr.length) >= ssizeof(fasttest::StrNoneOpt);
14107    return cond ? reinterpret_cast<fasttest::StrNoneOpt*>(&hdr) : NULL;
14108}
14109
14110// --- fasttest.StrNoneOpt.base.Castbase
14111inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::StrNoneOpt& parent) {
14112    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
14113}
14114
14115// --- fasttest.StrNoneOpt.pmask.N
14116// Return constant 1
14117inline int fasttest::pmask_N(fasttest::StrNoneOpt& parent) {
14118    (void)parent;
14119    return 1;
14120}
14121
14122// --- fasttest.StrNoneOpt.pmask.qFind
14123// Access value
14124inline u32& fasttest::pmask_qFind(fasttest::StrNoneOpt& parent, int) {
14125    return parent.pmask;
14126}
14127
14128// --- fasttest.StrNoneOpt.pmask.NBits
14129// Get max # of bits in the bitset
14130// Return max. number of bits supported by array
14131inline int fasttest::pmask_Nbits(fasttest::StrNoneOpt& parent) {
14132    return pmask_N(parent) * 32;
14133}
14134
14135// --- fasttest.StrNoneOpt.pmask.qGetBit
14136// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
14137inline bool fasttest::pmask_qGetBit(fasttest::StrNoneOpt& parent, u32 bit_idx) {
14138    u64 elem_idx = bit_idx >> 5;
14139    u64 shift = bit_idx & 31;
14140    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
14141    return bool((elem >> shift) & 1); // extract bit
14142}
14143
14144// --- fasttest.StrNoneOpt.pmask.GetBit
14145// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
14146inline bool fasttest::pmask_GetBit(fasttest::StrNoneOpt& parent, u32 bit_idx) {
14147    u64 elem_idx = bit_idx >> 5;
14148    u64 shift = bit_idx & 31;
14149    bool ret = false;
14150    u64 lim = pmask_N(parent);
14151    if (elem_idx < lim) {
14152        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
14153        ret = (elem >> shift) & 1;                 // extract bit
14154    }
14155    return ret;
14156}
14157
14158// --- fasttest.StrNoneOpt.pmask.BitsEmptyQ
14159// Check if all the bits in the bitset are equal to zero
14160inline bool fasttest::pmask_BitsEmptyQ(fasttest::StrNoneOpt& parent) {
14161    bool retval = true;
14162    u64 n = pmask_N(parent);
14163    for (u64 i = 0; i < n; i++) {
14164        if (pmask_qFind(parent,i) != 0) {
14165            retval = false;
14166            break;
14167        }
14168    }
14169    return retval;
14170}
14171
14172// --- fasttest.StrNoneOpt.pmask.Sum1s
14173inline u64 fasttest::pmask_Sum1s(fasttest::StrNoneOpt& parent) {
14174    u64 sum = 0;
14175    u64 n = pmask_N(parent);
14176    for (u64 i = 0; i < n; i++) {
14177        sum += algo::u32_Count1s(pmask_qFind(parent, i));
14178    }
14179    return sum;
14180}
14181
14182// --- fasttest.StrNoneOpt.pmask.qClearBit
14183// Clear bit # BIT_IDX in bit set. No bounds checking
14184inline void fasttest::pmask_qClearBit(fasttest::StrNoneOpt& parent, u32 bit_idx) {
14185    u64 elem_idx = bit_idx >> 5;
14186    u64 shift = bit_idx & 31;
14187    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14188    elem = elem & ~(u32(1) << shift); // clear bit
14189}
14190
14191// --- fasttest.StrNoneOpt.pmask.ClearBit
14192// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
14193inline void fasttest::pmask_ClearBit(fasttest::StrNoneOpt& parent, u32 bit_idx) {
14194    u64 elem_idx = bit_idx >> 5;
14195    u64 shift = bit_idx & 31;
14196    u64 lim = pmask_N(parent);
14197    if (elem_idx < lim) {
14198        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14199        elem = elem & ~(u32(1) << shift); // clear bit
14200    }
14201}
14202
14203// --- fasttest.StrNoneOpt.pmask.qSetBit
14204// Set bit # BIT_IDX in bit set. No bounds checking
14205inline void fasttest::pmask_qSetBit(fasttest::StrNoneOpt& parent, u32 bit_idx) {
14206    u64 elem_idx = bit_idx >> 5;
14207    u64 shift = bit_idx & 31;
14208    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14209    elem = elem | (u32(1) << shift); // set bit
14210}
14211
14212// --- fasttest.StrNoneOpt.pmask.SetBit
14213// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
14214inline void fasttest::pmask_SetBit(fasttest::StrNoneOpt& parent, u32 bit_idx) {
14215    u64 elem_idx = bit_idx >> 5;
14216    u64 shift = bit_idx & 31;
14217    u64 lim = pmask_N(parent);
14218    if (elem_idx < lim) {
14219        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14220        elem = elem | (u32(1) << shift); // set bit
14221    }
14222}
14223
14224// --- fasttest.StrNoneOpt.pmask.qSetBitVal
14225// Set bit # BIT_IDX in bit set. No bounds checking
14226inline void fasttest::pmask_qSetBitVal(fasttest::StrNoneOpt& parent, u32 bit_idx, bool val) {
14227    u64 elem_idx = bit_idx >> 5;
14228    u64 shift = bit_idx & 31;
14229    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14230    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
14231}
14232
14233// --- fasttest.StrNoneOpt.pmask.qOrBitVal
14234// Or bit # BIT_IDX in bit set. No bounds checking
14235inline void fasttest::pmask_qOrBitVal(fasttest::StrNoneOpt& parent, u32 bit_idx, bool val) {
14236    u64 elem_idx = bit_idx >> 5;
14237    u64 shift = bit_idx & 31;
14238    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14239    elem = elem | (u32(val) << shift); // Or in val into elem
14240}
14241
14242// --- fasttest.StrNoneOpt.pmask.ClearBitsAll
14243// Set all bits of array to zero.
14244// Note: this does not change what NBits will return.
14245inline void fasttest::pmask_ClearBitsAll(fasttest::StrNoneOpt& parent) {
14246    u64 n = pmask_N(parent);
14247    for (u64 i = 0; i < n; i++) {
14248        pmask_qFind(parent, i) = 0;
14249    }
14250}
14251
14252// --- fasttest.StrNoneOpt.pmask.ClearBits
14253// Zero in PARENT any bits that are set in RHS.
14254inline void fasttest::pmask_ClearBits(fasttest::StrNoneOpt& parent, fasttest::StrNoneOpt &rhs) {
14255    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
14256    for (u64 i = 0; i < n; i++) {
14257        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
14258    }
14259}
14260
14261// --- fasttest.StrNoneOpt.pmask.OrBits
14262// Set PARENT to union of two bitsets.
14263// (This function is not named Set.. to avoid triple entendre).
14264inline void fasttest::pmask_OrBits(fasttest::StrNoneOpt& parent, fasttest::StrNoneOpt &rhs) {
14265    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
14266    for (u64 i = 0; i < n; i++) {
14267        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
14268    }
14269}
14270
14271// --- fasttest.StrNoneOpt.pmask.Sup
14272// Return smallest number N such that indexes of all 1 bits are below N
14273inline i32 fasttest::pmask_Sup(fasttest::StrNoneOpt& parent) {
14274    u64 lim = pmask_N(parent);
14275    i32 ret = 0;
14276    for (int i = lim-1; i >= 0; i--) {
14277        u32 &val = pmask_qFind(parent, i);
14278        if (val) {
14279            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
14280            ret = i * 32 + bitidx;
14281            break;
14282        }
14283    }
14284    return ret;
14285}
14286
14287// --- fasttest.StrNoneOpt.Value.PresentQ
14288// Return true if the field is marked in the presence mask
14289inline bool fasttest::Value_PresentQ(fasttest::StrNoneOpt& parent) {
14290    return pmask_qGetBit(parent, 0);
14291}
14292
14293// --- fasttest.StrNoneOpt.Value.SetPresent
14294// Set presence bit for this field in the pmask
14295inline void fasttest::Value_SetPresent(fasttest::StrNoneOpt& parent) {
14296    pmask_qSetBit(parent, 0); // mark presence in pmask
14297}
14298
14299// --- fasttest.StrNoneOpt.Value.Present_GetBit
14300// Return field's bit number in the pmask
14301inline int fasttest::Value_Present_GetBit(fasttest::StrNoneOpt& parent) {
14302    int retval = 0;
14303    (void)parent;//only to avoid -Wunused-parameter
14304    return retval;
14305}
14306
14307// --- fasttest.StrNoneOpt.Value.Set
14308inline void fasttest::Value_Set(fasttest::StrNoneOpt& parent, const algo::strptr& rhs) {
14309    parent.Value = rhs;
14310    pmask_qSetBit(parent, 0); // mark presence in pmask
14311}
14312
14313// --- fasttest.StrNoneOpt.pmask_bitcurs.Reset
14314inline void fasttest::StrNoneOpt_pmask_bitcurs_Reset(StrNoneOpt_pmask_bitcurs &curs, fasttest::StrNoneOpt &parent) {
14315    curs.elems = &pmask_qFind(parent,0);
14316    curs.n_elems = pmask_N(parent);
14317    curs.bit = -1;
14318    StrNoneOpt_pmask_bitcurs_Next(curs);
14319}
14320
14321// --- fasttest.StrNoneOpt.pmask_bitcurs.ValidQ
14322// cursor points to valid item
14323inline bool fasttest::StrNoneOpt_pmask_bitcurs_ValidQ(StrNoneOpt_pmask_bitcurs &curs) {
14324    return curs.bit < curs.n_elems*32;
14325}
14326
14327// --- fasttest.StrNoneOpt.pmask_bitcurs.Access
14328// item access
14329inline int& fasttest::StrNoneOpt_pmask_bitcurs_Access(StrNoneOpt_pmask_bitcurs &curs) {
14330    return curs.bit;
14331}
14332
14333// --- fasttest.StrNoneOpt..GetMsgLength
14334// Message length (uses length field)
14335inline i32 fasttest::GetMsgLength(const fasttest::StrNoneOpt& parent) {
14336    return i32(const_cast<fasttest::StrNoneOpt&>(parent).length);
14337}
14338
14339// --- fasttest.StrNoneOpt..GetMsgMemptr
14340// Memptr encompassing the message (uses length field)
14341inline algo::memptr fasttest::GetMsgMemptr(const fasttest::StrNoneOpt& row) {
14342    return algo::memptr((u8*)&row, i32(const_cast<fasttest::StrNoneOpt&>(row).length));
14343}
14344
14345// --- fasttest.StrNoneOpt..Init
14346// Set all fields to initial values.
14347inline void fasttest::StrNoneOpt_Init(fasttest::StrNoneOpt& parent) {
14348    parent.length = u32(ssizeof(parent) + (0));
14349    parent.id = u32(6);
14350    parent.pmask = u32(0);
14351}
14352inline fasttest::TemplateHeader::TemplateHeader() {
14353    fasttest::TemplateHeader_Init(*this);
14354}
14355
14356
14357// --- fasttest.TemplateHeader.id.GetEnum
14358// Get value of field as enum type
14359inline fasttest_TemplateHeader_id_Enum fasttest::id_GetEnum(const fasttest::TemplateHeader& parent) {
14360    return fasttest_TemplateHeader_id_Enum(parent.id);
14361}
14362
14363// --- fasttest.TemplateHeader.id.SetEnum
14364// Set value of field from enum type.
14365inline void fasttest::id_SetEnum(fasttest::TemplateHeader& parent, fasttest_TemplateHeader_id_Enum rhs) {
14366    parent.id = u32(rhs);
14367}
14368
14369// --- fasttest.TemplateHeader..GetMsgLength
14370// Message length (uses length field)
14371inline i32 fasttest::GetMsgLength(const fasttest::TemplateHeader& parent) {
14372    return i32(const_cast<fasttest::TemplateHeader&>(parent).length);
14373}
14374
14375// --- fasttest.TemplateHeader..GetMsgMemptr
14376// Memptr encompassing the message (uses length field)
14377inline algo::memptr fasttest::GetMsgMemptr(const fasttest::TemplateHeader& row) {
14378    return algo::memptr((u8*)&row, i32(const_cast<fasttest::TemplateHeader&>(row).length));
14379}
14380
14381// --- fasttest.TemplateHeader..Init
14382// Set all fields to initial values.
14383inline void fasttest::TemplateHeader_Init(fasttest::TemplateHeader& parent) {
14384    parent.length = u32(0);
14385    parent.id = u32(0);
14386}
14387inline fasttest::TemplateHeaderMsgsCase::TemplateHeaderMsgsCase(u32                            in_value)
14388    : value(in_value)
14389{
14390}
14391inline fasttest::TemplateHeaderMsgsCase::TemplateHeaderMsgsCase(fasttest_TemplateHeaderMsgsCaseEnum arg) { this->value = u32(arg); }
14392inline fasttest::TemplateHeaderMsgsCase::TemplateHeaderMsgsCase() {
14393    fasttest::TemplateHeaderMsgsCase_Init(*this);
14394}
14395
14396
14397// --- fasttest.TemplateHeaderMsgsCase.value.GetEnum
14398// Get value of field as enum type
14399inline fasttest_TemplateHeaderMsgsCaseEnum fasttest::value_GetEnum(const fasttest::TemplateHeaderMsgsCase& parent) {
14400    return fasttest_TemplateHeaderMsgsCaseEnum(parent.value);
14401}
14402
14403// --- fasttest.TemplateHeaderMsgsCase.value.SetEnum
14404// Set value of field from enum type.
14405inline void fasttest::value_SetEnum(fasttest::TemplateHeaderMsgsCase& parent, fasttest_TemplateHeaderMsgsCaseEnum rhs) {
14406    parent.value = u32(rhs);
14407}
14408
14409// --- fasttest.TemplateHeaderMsgsCase.value.Cast
14410inline fasttest::TemplateHeaderMsgsCase::operator fasttest_TemplateHeaderMsgsCaseEnum () const {
14411    return fasttest_TemplateHeaderMsgsCaseEnum((*this).value);
14412}
14413
14414// --- fasttest.TemplateHeaderMsgsCase..Init
14415// Set all fields to initial values.
14416inline void fasttest::TemplateHeaderMsgsCase_Init(fasttest::TemplateHeaderMsgsCase& parent) {
14417    parent.value = u32(0);
14418}
14419inline fasttest::TemplateHeader_curs::TemplateHeader_curs() {
14420    fasttest::TemplateHeader_curs_Init(*this);
14421}
14422
14423
14424// --- fasttest.TemplateHeader_curs..ValidQ
14425inline bool fasttest::TemplateHeader_curs_ValidQ(fasttest::TemplateHeader_curs& curs) {
14426    return curs.msg != NULL;
14427}
14428
14429// --- fasttest.TemplateHeader_curs..Reset
14430inline void fasttest::TemplateHeader_curs_Reset(fasttest::TemplateHeader_curs& curs, algo::memptr buf) {
14431    curs.bytes = buf.elems;
14432    curs.limit = buf.n_elems;
14433    fasttest::TemplateHeader *msg = NULL;
14434    int msglen = 0;
14435    if (curs.limit >= ssizeof(fasttest::TemplateHeader)) {
14436        fasttest::TemplateHeader *ptr = (fasttest::TemplateHeader*)curs.bytes;
14437        msglen = i32((*ptr).length);
14438        if (msglen >= ssizeof(fasttest::TemplateHeader) && curs.limit >= msglen) {
14439            msg = ptr;
14440        }
14441    }
14442    curs.msg = msg;
14443    curs.msglen = msglen;
14444}
14445
14446// --- fasttest.TemplateHeader_curs..Access
14447inline fasttest::TemplateHeader*& fasttest::TemplateHeader_curs_Access(fasttest::TemplateHeader_curs& curs) {
14448    return curs.msg;
14449}
14450
14451// --- fasttest.TemplateHeader_curs..Next
14452inline void fasttest::TemplateHeader_curs_Next(fasttest::TemplateHeader_curs& curs) {
14453    curs.bytes += curs.msglen;
14454    curs.limit -= curs.msglen;
14455    fasttest::TemplateHeader *msg = NULL;
14456    int msglen = 0;
14457    if (curs.limit >= ssizeof(fasttest::TemplateHeader)) {
14458        fasttest::TemplateHeader *ptr = (fasttest::TemplateHeader*)curs.bytes;
14459        msglen = i32((*ptr).length);
14460        if (msglen >= ssizeof(fasttest::TemplateHeader) && curs.limit >= msglen) {
14461            msg = ptr;
14462        }
14463    }
14464    curs.msg = msg;
14465    curs.msglen = msglen;
14466}
14467
14468// --- fasttest.TemplateHeader_curs..Init
14469// Set all fields to initial values.
14470inline void fasttest::TemplateHeader_curs_Init(fasttest::TemplateHeader_curs& parent) {
14471    parent.msg = NULL;
14472    parent.bytes = NULL;
14473    parent.limit = i32(0);
14474    parent.msglen = i32(0);
14475}
14476inline fasttest::U32Const::U32Const() {
14477    fasttest::U32Const_Init(*this);
14478}
14479
14480
14481// --- fasttest.U32Const.base.Castdown
14482// Check if fasttest::TemplateHeader is an instance of U32Const by checking the type field
14483// If it is, return the pointer of target type.
14484// Additionally, check if the length field permits valid instance of U32Const.
14485// If not successful, quietly return NULL.
14486inline fasttest::U32Const* fasttest::U32Const_Castdown(fasttest::TemplateHeader &hdr) {
14487    bool cond = hdr.id == (19);
14488    cond &= i32(hdr.length) >= ssizeof(fasttest::U32Const);
14489    return cond ? reinterpret_cast<fasttest::U32Const*>(&hdr) : NULL;
14490}
14491
14492// --- fasttest.U32Const.base.Castbase
14493inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32Const& parent) {
14494    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
14495}
14496
14497// --- fasttest.U32Const.Value.Get
14498inline u32 fasttest::Value_Get(fasttest::U32Const& parent) {
14499    (void)parent;
14500    return u32(19);
14501}
14502
14503// --- fasttest.U32Const..GetMsgLength
14504// Message length (uses length field)
14505inline i32 fasttest::GetMsgLength(const fasttest::U32Const& parent) {
14506    return i32(const_cast<fasttest::U32Const&>(parent).length);
14507}
14508
14509// --- fasttest.U32Const..GetMsgMemptr
14510// Memptr encompassing the message (uses length field)
14511inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32Const& row) {
14512    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32Const&>(row).length));
14513}
14514
14515// --- fasttest.U32Const..Init
14516// Set all fields to initial values.
14517inline void fasttest::U32Const_Init(fasttest::U32Const& parent) {
14518    parent.length = u32(ssizeof(parent) + (0));
14519    parent.id = u32(19);
14520}
14521inline fasttest::U32ConstOpt::U32ConstOpt() {
14522    fasttest::U32ConstOpt_Init(*this);
14523}
14524
14525
14526// --- fasttest.U32ConstOpt.base.Castdown
14527// Check if fasttest::TemplateHeader is an instance of U32ConstOpt by checking the type field
14528// If it is, return the pointer of target type.
14529// Additionally, check if the length field permits valid instance of U32ConstOpt.
14530// If not successful, quietly return NULL.
14531inline fasttest::U32ConstOpt* fasttest::U32ConstOpt_Castdown(fasttest::TemplateHeader &hdr) {
14532    bool cond = hdr.id == (20);
14533    cond &= i32(hdr.length) >= ssizeof(fasttest::U32ConstOpt);
14534    return cond ? reinterpret_cast<fasttest::U32ConstOpt*>(&hdr) : NULL;
14535}
14536
14537// --- fasttest.U32ConstOpt.base.Castbase
14538inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32ConstOpt& parent) {
14539    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
14540}
14541
14542// --- fasttest.U32ConstOpt.pmask.N
14543// Return constant 1
14544inline int fasttest::pmask_N(fasttest::U32ConstOpt& parent) {
14545    (void)parent;
14546    return 1;
14547}
14548
14549// --- fasttest.U32ConstOpt.pmask.qFind
14550// Access value
14551inline u32& fasttest::pmask_qFind(fasttest::U32ConstOpt& parent, int) {
14552    return parent.pmask;
14553}
14554
14555// --- fasttest.U32ConstOpt.pmask.NBits
14556// Get max # of bits in the bitset
14557// Return max. number of bits supported by array
14558inline int fasttest::pmask_Nbits(fasttest::U32ConstOpt& parent) {
14559    return pmask_N(parent) * 32;
14560}
14561
14562// --- fasttest.U32ConstOpt.pmask.qGetBit
14563// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
14564inline bool fasttest::pmask_qGetBit(fasttest::U32ConstOpt& parent, u32 bit_idx) {
14565    u64 elem_idx = bit_idx >> 5;
14566    u64 shift = bit_idx & 31;
14567    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
14568    return bool((elem >> shift) & 1); // extract bit
14569}
14570
14571// --- fasttest.U32ConstOpt.pmask.GetBit
14572// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
14573inline bool fasttest::pmask_GetBit(fasttest::U32ConstOpt& parent, u32 bit_idx) {
14574    u64 elem_idx = bit_idx >> 5;
14575    u64 shift = bit_idx & 31;
14576    bool ret = false;
14577    u64 lim = pmask_N(parent);
14578    if (elem_idx < lim) {
14579        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
14580        ret = (elem >> shift) & 1;                 // extract bit
14581    }
14582    return ret;
14583}
14584
14585// --- fasttest.U32ConstOpt.pmask.BitsEmptyQ
14586// Check if all the bits in the bitset are equal to zero
14587inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32ConstOpt& parent) {
14588    bool retval = true;
14589    u64 n = pmask_N(parent);
14590    for (u64 i = 0; i < n; i++) {
14591        if (pmask_qFind(parent,i) != 0) {
14592            retval = false;
14593            break;
14594        }
14595    }
14596    return retval;
14597}
14598
14599// --- fasttest.U32ConstOpt.pmask.Sum1s
14600inline u64 fasttest::pmask_Sum1s(fasttest::U32ConstOpt& parent) {
14601    u64 sum = 0;
14602    u64 n = pmask_N(parent);
14603    for (u64 i = 0; i < n; i++) {
14604        sum += algo::u32_Count1s(pmask_qFind(parent, i));
14605    }
14606    return sum;
14607}
14608
14609// --- fasttest.U32ConstOpt.pmask.qClearBit
14610// Clear bit # BIT_IDX in bit set. No bounds checking
14611inline void fasttest::pmask_qClearBit(fasttest::U32ConstOpt& parent, u32 bit_idx) {
14612    u64 elem_idx = bit_idx >> 5;
14613    u64 shift = bit_idx & 31;
14614    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14615    elem = elem & ~(u32(1) << shift); // clear bit
14616}
14617
14618// --- fasttest.U32ConstOpt.pmask.ClearBit
14619// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
14620inline void fasttest::pmask_ClearBit(fasttest::U32ConstOpt& parent, u32 bit_idx) {
14621    u64 elem_idx = bit_idx >> 5;
14622    u64 shift = bit_idx & 31;
14623    u64 lim = pmask_N(parent);
14624    if (elem_idx < lim) {
14625        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14626        elem = elem & ~(u32(1) << shift); // clear bit
14627    }
14628}
14629
14630// --- fasttest.U32ConstOpt.pmask.qSetBit
14631// Set bit # BIT_IDX in bit set. No bounds checking
14632inline void fasttest::pmask_qSetBit(fasttest::U32ConstOpt& parent, u32 bit_idx) {
14633    u64 elem_idx = bit_idx >> 5;
14634    u64 shift = bit_idx & 31;
14635    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14636    elem = elem | (u32(1) << shift); // set bit
14637}
14638
14639// --- fasttest.U32ConstOpt.pmask.SetBit
14640// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
14641inline void fasttest::pmask_SetBit(fasttest::U32ConstOpt& parent, u32 bit_idx) {
14642    u64 elem_idx = bit_idx >> 5;
14643    u64 shift = bit_idx & 31;
14644    u64 lim = pmask_N(parent);
14645    if (elem_idx < lim) {
14646        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14647        elem = elem | (u32(1) << shift); // set bit
14648    }
14649}
14650
14651// --- fasttest.U32ConstOpt.pmask.qSetBitVal
14652// Set bit # BIT_IDX in bit set. No bounds checking
14653inline void fasttest::pmask_qSetBitVal(fasttest::U32ConstOpt& parent, u32 bit_idx, bool val) {
14654    u64 elem_idx = bit_idx >> 5;
14655    u64 shift = bit_idx & 31;
14656    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14657    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
14658}
14659
14660// --- fasttest.U32ConstOpt.pmask.qOrBitVal
14661// Or bit # BIT_IDX in bit set. No bounds checking
14662inline void fasttest::pmask_qOrBitVal(fasttest::U32ConstOpt& parent, u32 bit_idx, bool val) {
14663    u64 elem_idx = bit_idx >> 5;
14664    u64 shift = bit_idx & 31;
14665    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14666    elem = elem | (u32(val) << shift); // Or in val into elem
14667}
14668
14669// --- fasttest.U32ConstOpt.pmask.ClearBitsAll
14670// Set all bits of array to zero.
14671// Note: this does not change what NBits will return.
14672inline void fasttest::pmask_ClearBitsAll(fasttest::U32ConstOpt& parent) {
14673    u64 n = pmask_N(parent);
14674    for (u64 i = 0; i < n; i++) {
14675        pmask_qFind(parent, i) = 0;
14676    }
14677}
14678
14679// --- fasttest.U32ConstOpt.pmask.ClearBits
14680// Zero in PARENT any bits that are set in RHS.
14681inline void fasttest::pmask_ClearBits(fasttest::U32ConstOpt& parent, fasttest::U32ConstOpt &rhs) {
14682    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
14683    for (u64 i = 0; i < n; i++) {
14684        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
14685    }
14686}
14687
14688// --- fasttest.U32ConstOpt.pmask.OrBits
14689// Set PARENT to union of two bitsets.
14690// (This function is not named Set.. to avoid triple entendre).
14691inline void fasttest::pmask_OrBits(fasttest::U32ConstOpt& parent, fasttest::U32ConstOpt &rhs) {
14692    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
14693    for (u64 i = 0; i < n; i++) {
14694        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
14695    }
14696}
14697
14698// --- fasttest.U32ConstOpt.pmask.Sup
14699// Return smallest number N such that indexes of all 1 bits are below N
14700inline i32 fasttest::pmask_Sup(fasttest::U32ConstOpt& parent) {
14701    u64 lim = pmask_N(parent);
14702    i32 ret = 0;
14703    for (int i = lim-1; i >= 0; i--) {
14704        u32 &val = pmask_qFind(parent, i);
14705        if (val) {
14706            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
14707            ret = i * 32 + bitidx;
14708            break;
14709        }
14710    }
14711    return ret;
14712}
14713
14714// --- fasttest.U32ConstOpt.Value.PresentQ
14715// Return true if the field is marked in the presence mask
14716inline bool fasttest::Value_PresentQ(fasttest::U32ConstOpt& parent) {
14717    return pmask_qGetBit(parent, 0);
14718}
14719
14720// --- fasttest.U32ConstOpt.Value.SetPresent
14721// Set presence bit for this field in the pmask
14722inline void fasttest::Value_SetPresent(fasttest::U32ConstOpt& parent) {
14723    pmask_qSetBit(parent, 0); // mark presence in pmask
14724}
14725
14726// --- fasttest.U32ConstOpt.Value.Present_GetBit
14727// Return field's bit number in the pmask
14728inline int fasttest::Value_Present_GetBit(fasttest::U32ConstOpt& parent) {
14729    int retval = 0;
14730    (void)parent;//only to avoid -Wunused-parameter
14731    return retval;
14732}
14733
14734// --- fasttest.U32ConstOpt.Value.Get
14735inline u32 fasttest::Value_Get(fasttest::U32ConstOpt& parent) {
14736    (void)parent;
14737    return u32(20);
14738}
14739
14740// --- fasttest.U32ConstOpt.pmask_bitcurs.Reset
14741inline void fasttest::U32ConstOpt_pmask_bitcurs_Reset(U32ConstOpt_pmask_bitcurs &curs, fasttest::U32ConstOpt &parent) {
14742    curs.elems = &pmask_qFind(parent,0);
14743    curs.n_elems = pmask_N(parent);
14744    curs.bit = -1;
14745    U32ConstOpt_pmask_bitcurs_Next(curs);
14746}
14747
14748// --- fasttest.U32ConstOpt.pmask_bitcurs.ValidQ
14749// cursor points to valid item
14750inline bool fasttest::U32ConstOpt_pmask_bitcurs_ValidQ(U32ConstOpt_pmask_bitcurs &curs) {
14751    return curs.bit < curs.n_elems*32;
14752}
14753
14754// --- fasttest.U32ConstOpt.pmask_bitcurs.Access
14755// item access
14756inline int& fasttest::U32ConstOpt_pmask_bitcurs_Access(U32ConstOpt_pmask_bitcurs &curs) {
14757    return curs.bit;
14758}
14759
14760// --- fasttest.U32ConstOpt..GetMsgLength
14761// Message length (uses length field)
14762inline i32 fasttest::GetMsgLength(const fasttest::U32ConstOpt& parent) {
14763    return i32(const_cast<fasttest::U32ConstOpt&>(parent).length);
14764}
14765
14766// --- fasttest.U32ConstOpt..GetMsgMemptr
14767// Memptr encompassing the message (uses length field)
14768inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32ConstOpt& row) {
14769    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32ConstOpt&>(row).length));
14770}
14771
14772// --- fasttest.U32ConstOpt..Init
14773// Set all fields to initial values.
14774inline void fasttest::U32ConstOpt_Init(fasttest::U32ConstOpt& parent) {
14775    parent.length = u32(ssizeof(parent) + (0));
14776    parent.id = u32(20);
14777    parent.pmask = u32(0);
14778}
14779inline fasttest::U32Copy::U32Copy() {
14780    fasttest::U32Copy_Init(*this);
14781}
14782
14783
14784// --- fasttest.U32Copy.base.Castdown
14785// Check if fasttest::TemplateHeader is an instance of U32Copy by checking the type field
14786// If it is, return the pointer of target type.
14787// Additionally, check if the length field permits valid instance of U32Copy.
14788// If not successful, quietly return NULL.
14789inline fasttest::U32Copy* fasttest::U32Copy_Castdown(fasttest::TemplateHeader &hdr) {
14790    bool cond = hdr.id == (52);
14791    cond &= i32(hdr.length) >= ssizeof(fasttest::U32Copy);
14792    return cond ? reinterpret_cast<fasttest::U32Copy*>(&hdr) : NULL;
14793}
14794
14795// --- fasttest.U32Copy.base.Castbase
14796inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32Copy& parent) {
14797    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
14798}
14799
14800// --- fasttest.U32Copy..GetMsgLength
14801// Message length (uses length field)
14802inline i32 fasttest::GetMsgLength(const fasttest::U32Copy& parent) {
14803    return i32(const_cast<fasttest::U32Copy&>(parent).length);
14804}
14805
14806// --- fasttest.U32Copy..GetMsgMemptr
14807// Memptr encompassing the message (uses length field)
14808inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32Copy& row) {
14809    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32Copy&>(row).length));
14810}
14811
14812// --- fasttest.U32Copy..Init
14813// Set all fields to initial values.
14814inline void fasttest::U32Copy_Init(fasttest::U32Copy& parent) {
14815    parent.length = u32(ssizeof(parent) + (0));
14816    parent.id = u32(52);
14817    parent.Value52 = u32(52);
14818}
14819inline fasttest::U32CopyNull::U32CopyNull() {
14820    fasttest::U32CopyNull_Init(*this);
14821}
14822
14823
14824// --- fasttest.U32CopyNull.base.Castdown
14825// Check if fasttest::TemplateHeader is an instance of U32CopyNull by checking the type field
14826// If it is, return the pointer of target type.
14827// Additionally, check if the length field permits valid instance of U32CopyNull.
14828// If not successful, quietly return NULL.
14829inline fasttest::U32CopyNull* fasttest::U32CopyNull_Castdown(fasttest::TemplateHeader &hdr) {
14830    bool cond = hdr.id == (54);
14831    cond &= i32(hdr.length) >= ssizeof(fasttest::U32CopyNull);
14832    return cond ? reinterpret_cast<fasttest::U32CopyNull*>(&hdr) : NULL;
14833}
14834
14835// --- fasttest.U32CopyNull.base.Castbase
14836inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32CopyNull& parent) {
14837    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
14838}
14839
14840// --- fasttest.U32CopyNull.pmask.N
14841// Return constant 1
14842inline int fasttest::pmask_N(fasttest::U32CopyNull& parent) {
14843    (void)parent;
14844    return 1;
14845}
14846
14847// --- fasttest.U32CopyNull.pmask.qFind
14848// Access value
14849inline u32& fasttest::pmask_qFind(fasttest::U32CopyNull& parent, int) {
14850    return parent.pmask;
14851}
14852
14853// --- fasttest.U32CopyNull.pmask.NBits
14854// Get max # of bits in the bitset
14855// Return max. number of bits supported by array
14856inline int fasttest::pmask_Nbits(fasttest::U32CopyNull& parent) {
14857    return pmask_N(parent) * 32;
14858}
14859
14860// --- fasttest.U32CopyNull.pmask.qGetBit
14861// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
14862inline bool fasttest::pmask_qGetBit(fasttest::U32CopyNull& parent, u32 bit_idx) {
14863    u64 elem_idx = bit_idx >> 5;
14864    u64 shift = bit_idx & 31;
14865    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
14866    return bool((elem >> shift) & 1); // extract bit
14867}
14868
14869// --- fasttest.U32CopyNull.pmask.GetBit
14870// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
14871inline bool fasttest::pmask_GetBit(fasttest::U32CopyNull& parent, u32 bit_idx) {
14872    u64 elem_idx = bit_idx >> 5;
14873    u64 shift = bit_idx & 31;
14874    bool ret = false;
14875    u64 lim = pmask_N(parent);
14876    if (elem_idx < lim) {
14877        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
14878        ret = (elem >> shift) & 1;                 // extract bit
14879    }
14880    return ret;
14881}
14882
14883// --- fasttest.U32CopyNull.pmask.BitsEmptyQ
14884// Check if all the bits in the bitset are equal to zero
14885inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32CopyNull& parent) {
14886    bool retval = true;
14887    u64 n = pmask_N(parent);
14888    for (u64 i = 0; i < n; i++) {
14889        if (pmask_qFind(parent,i) != 0) {
14890            retval = false;
14891            break;
14892        }
14893    }
14894    return retval;
14895}
14896
14897// --- fasttest.U32CopyNull.pmask.Sum1s
14898inline u64 fasttest::pmask_Sum1s(fasttest::U32CopyNull& parent) {
14899    u64 sum = 0;
14900    u64 n = pmask_N(parent);
14901    for (u64 i = 0; i < n; i++) {
14902        sum += algo::u32_Count1s(pmask_qFind(parent, i));
14903    }
14904    return sum;
14905}
14906
14907// --- fasttest.U32CopyNull.pmask.qClearBit
14908// Clear bit # BIT_IDX in bit set. No bounds checking
14909inline void fasttest::pmask_qClearBit(fasttest::U32CopyNull& parent, u32 bit_idx) {
14910    u64 elem_idx = bit_idx >> 5;
14911    u64 shift = bit_idx & 31;
14912    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14913    elem = elem & ~(u32(1) << shift); // clear bit
14914}
14915
14916// --- fasttest.U32CopyNull.pmask.ClearBit
14917// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
14918inline void fasttest::pmask_ClearBit(fasttest::U32CopyNull& parent, u32 bit_idx) {
14919    u64 elem_idx = bit_idx >> 5;
14920    u64 shift = bit_idx & 31;
14921    u64 lim = pmask_N(parent);
14922    if (elem_idx < lim) {
14923        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14924        elem = elem & ~(u32(1) << shift); // clear bit
14925    }
14926}
14927
14928// --- fasttest.U32CopyNull.pmask.qSetBit
14929// Set bit # BIT_IDX in bit set. No bounds checking
14930inline void fasttest::pmask_qSetBit(fasttest::U32CopyNull& parent, u32 bit_idx) {
14931    u64 elem_idx = bit_idx >> 5;
14932    u64 shift = bit_idx & 31;
14933    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14934    elem = elem | (u32(1) << shift); // set bit
14935}
14936
14937// --- fasttest.U32CopyNull.pmask.SetBit
14938// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
14939inline void fasttest::pmask_SetBit(fasttest::U32CopyNull& parent, u32 bit_idx) {
14940    u64 elem_idx = bit_idx >> 5;
14941    u64 shift = bit_idx & 31;
14942    u64 lim = pmask_N(parent);
14943    if (elem_idx < lim) {
14944        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14945        elem = elem | (u32(1) << shift); // set bit
14946    }
14947}
14948
14949// --- fasttest.U32CopyNull.pmask.qSetBitVal
14950// Set bit # BIT_IDX in bit set. No bounds checking
14951inline void fasttest::pmask_qSetBitVal(fasttest::U32CopyNull& parent, u32 bit_idx, bool val) {
14952    u64 elem_idx = bit_idx >> 5;
14953    u64 shift = bit_idx & 31;
14954    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14955    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
14956}
14957
14958// --- fasttest.U32CopyNull.pmask.qOrBitVal
14959// Or bit # BIT_IDX in bit set. No bounds checking
14960inline void fasttest::pmask_qOrBitVal(fasttest::U32CopyNull& parent, u32 bit_idx, bool val) {
14961    u64 elem_idx = bit_idx >> 5;
14962    u64 shift = bit_idx & 31;
14963    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
14964    elem = elem | (u32(val) << shift); // Or in val into elem
14965}
14966
14967// --- fasttest.U32CopyNull.pmask.ClearBitsAll
14968// Set all bits of array to zero.
14969// Note: this does not change what NBits will return.
14970inline void fasttest::pmask_ClearBitsAll(fasttest::U32CopyNull& parent) {
14971    u64 n = pmask_N(parent);
14972    for (u64 i = 0; i < n; i++) {
14973        pmask_qFind(parent, i) = 0;
14974    }
14975}
14976
14977// --- fasttest.U32CopyNull.pmask.ClearBits
14978// Zero in PARENT any bits that are set in RHS.
14979inline void fasttest::pmask_ClearBits(fasttest::U32CopyNull& parent, fasttest::U32CopyNull &rhs) {
14980    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
14981    for (u64 i = 0; i < n; i++) {
14982        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
14983    }
14984}
14985
14986// --- fasttest.U32CopyNull.pmask.OrBits
14987// Set PARENT to union of two bitsets.
14988// (This function is not named Set.. to avoid triple entendre).
14989inline void fasttest::pmask_OrBits(fasttest::U32CopyNull& parent, fasttest::U32CopyNull &rhs) {
14990    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
14991    for (u64 i = 0; i < n; i++) {
14992        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
14993    }
14994}
14995
14996// --- fasttest.U32CopyNull.pmask.Sup
14997// Return smallest number N such that indexes of all 1 bits are below N
14998inline i32 fasttest::pmask_Sup(fasttest::U32CopyNull& parent) {
14999    u64 lim = pmask_N(parent);
15000    i32 ret = 0;
15001    for (int i = lim-1; i >= 0; i--) {
15002        u32 &val = pmask_qFind(parent, i);
15003        if (val) {
15004            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
15005            ret = i * 32 + bitidx;
15006            break;
15007        }
15008    }
15009    return ret;
15010}
15011
15012// --- fasttest.U32CopyNull.Value54.PresentQ
15013// Return true if the field is marked in the presence mask
15014inline bool fasttest::Value54_PresentQ(fasttest::U32CopyNull& parent) {
15015    return pmask_qGetBit(parent, 0);
15016}
15017
15018// --- fasttest.U32CopyNull.Value54.SetPresent
15019// Set presence bit for this field in the pmask
15020inline void fasttest::Value54_SetPresent(fasttest::U32CopyNull& parent) {
15021    pmask_qSetBit(parent, 0); // mark presence in pmask
15022}
15023
15024// --- fasttest.U32CopyNull.Value54.Present_GetBit
15025// Return field's bit number in the pmask
15026inline int fasttest::Value54_Present_GetBit(fasttest::U32CopyNull& parent) {
15027    int retval = 0;
15028    (void)parent;//only to avoid -Wunused-parameter
15029    return retval;
15030}
15031
15032// --- fasttest.U32CopyNull.Value54.Set
15033inline void fasttest::Value54_Set(fasttest::U32CopyNull& parent, u32 rhs) {
15034    parent.Value54 = rhs;
15035    pmask_qSetBit(parent, 0); // mark presence in pmask
15036}
15037
15038// --- fasttest.U32CopyNull.pmask_bitcurs.Reset
15039inline void fasttest::U32CopyNull_pmask_bitcurs_Reset(U32CopyNull_pmask_bitcurs &curs, fasttest::U32CopyNull &parent) {
15040    curs.elems = &pmask_qFind(parent,0);
15041    curs.n_elems = pmask_N(parent);
15042    curs.bit = -1;
15043    U32CopyNull_pmask_bitcurs_Next(curs);
15044}
15045
15046// --- fasttest.U32CopyNull.pmask_bitcurs.ValidQ
15047// cursor points to valid item
15048inline bool fasttest::U32CopyNull_pmask_bitcurs_ValidQ(U32CopyNull_pmask_bitcurs &curs) {
15049    return curs.bit < curs.n_elems*32;
15050}
15051
15052// --- fasttest.U32CopyNull.pmask_bitcurs.Access
15053// item access
15054inline int& fasttest::U32CopyNull_pmask_bitcurs_Access(U32CopyNull_pmask_bitcurs &curs) {
15055    return curs.bit;
15056}
15057
15058// --- fasttest.U32CopyNull..GetMsgLength
15059// Message length (uses length field)
15060inline i32 fasttest::GetMsgLength(const fasttest::U32CopyNull& parent) {
15061    return i32(const_cast<fasttest::U32CopyNull&>(parent).length);
15062}
15063
15064// --- fasttest.U32CopyNull..GetMsgMemptr
15065// Memptr encompassing the message (uses length field)
15066inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32CopyNull& row) {
15067    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32CopyNull&>(row).length));
15068}
15069
15070// --- fasttest.U32CopyNull..Init
15071// Set all fields to initial values.
15072inline void fasttest::U32CopyNull_Init(fasttest::U32CopyNull& parent) {
15073    parent.length = u32(ssizeof(parent) + (0));
15074    parent.id = u32(54);
15075    parent.pmask = u32(0);
15076    parent.Value54 = u32(0);
15077}
15078inline fasttest::U32CopyOpt::U32CopyOpt() {
15079    fasttest::U32CopyOpt_Init(*this);
15080}
15081
15082
15083// --- fasttest.U32CopyOpt.base.Castdown
15084// Check if fasttest::TemplateHeader is an instance of U32CopyOpt by checking the type field
15085// If it is, return the pointer of target type.
15086// Additionally, check if the length field permits valid instance of U32CopyOpt.
15087// If not successful, quietly return NULL.
15088inline fasttest::U32CopyOpt* fasttest::U32CopyOpt_Castdown(fasttest::TemplateHeader &hdr) {
15089    bool cond = hdr.id == (53);
15090    cond &= i32(hdr.length) >= ssizeof(fasttest::U32CopyOpt);
15091    return cond ? reinterpret_cast<fasttest::U32CopyOpt*>(&hdr) : NULL;
15092}
15093
15094// --- fasttest.U32CopyOpt.base.Castbase
15095inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32CopyOpt& parent) {
15096    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
15097}
15098
15099// --- fasttest.U32CopyOpt.pmask.N
15100// Return constant 1
15101inline int fasttest::pmask_N(fasttest::U32CopyOpt& parent) {
15102    (void)parent;
15103    return 1;
15104}
15105
15106// --- fasttest.U32CopyOpt.pmask.qFind
15107// Access value
15108inline u32& fasttest::pmask_qFind(fasttest::U32CopyOpt& parent, int) {
15109    return parent.pmask;
15110}
15111
15112// --- fasttest.U32CopyOpt.pmask.NBits
15113// Get max # of bits in the bitset
15114// Return max. number of bits supported by array
15115inline int fasttest::pmask_Nbits(fasttest::U32CopyOpt& parent) {
15116    return pmask_N(parent) * 32;
15117}
15118
15119// --- fasttest.U32CopyOpt.pmask.qGetBit
15120// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
15121inline bool fasttest::pmask_qGetBit(fasttest::U32CopyOpt& parent, u32 bit_idx) {
15122    u64 elem_idx = bit_idx >> 5;
15123    u64 shift = bit_idx & 31;
15124    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
15125    return bool((elem >> shift) & 1); // extract bit
15126}
15127
15128// --- fasttest.U32CopyOpt.pmask.GetBit
15129// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
15130inline bool fasttest::pmask_GetBit(fasttest::U32CopyOpt& parent, u32 bit_idx) {
15131    u64 elem_idx = bit_idx >> 5;
15132    u64 shift = bit_idx & 31;
15133    bool ret = false;
15134    u64 lim = pmask_N(parent);
15135    if (elem_idx < lim) {
15136        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
15137        ret = (elem >> shift) & 1;                 // extract bit
15138    }
15139    return ret;
15140}
15141
15142// --- fasttest.U32CopyOpt.pmask.BitsEmptyQ
15143// Check if all the bits in the bitset are equal to zero
15144inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32CopyOpt& parent) {
15145    bool retval = true;
15146    u64 n = pmask_N(parent);
15147    for (u64 i = 0; i < n; i++) {
15148        if (pmask_qFind(parent,i) != 0) {
15149            retval = false;
15150            break;
15151        }
15152    }
15153    return retval;
15154}
15155
15156// --- fasttest.U32CopyOpt.pmask.Sum1s
15157inline u64 fasttest::pmask_Sum1s(fasttest::U32CopyOpt& parent) {
15158    u64 sum = 0;
15159    u64 n = pmask_N(parent);
15160    for (u64 i = 0; i < n; i++) {
15161        sum += algo::u32_Count1s(pmask_qFind(parent, i));
15162    }
15163    return sum;
15164}
15165
15166// --- fasttest.U32CopyOpt.pmask.qClearBit
15167// Clear bit # BIT_IDX in bit set. No bounds checking
15168inline void fasttest::pmask_qClearBit(fasttest::U32CopyOpt& parent, u32 bit_idx) {
15169    u64 elem_idx = bit_idx >> 5;
15170    u64 shift = bit_idx & 31;
15171    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15172    elem = elem & ~(u32(1) << shift); // clear bit
15173}
15174
15175// --- fasttest.U32CopyOpt.pmask.ClearBit
15176// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
15177inline void fasttest::pmask_ClearBit(fasttest::U32CopyOpt& parent, u32 bit_idx) {
15178    u64 elem_idx = bit_idx >> 5;
15179    u64 shift = bit_idx & 31;
15180    u64 lim = pmask_N(parent);
15181    if (elem_idx < lim) {
15182        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15183        elem = elem & ~(u32(1) << shift); // clear bit
15184    }
15185}
15186
15187// --- fasttest.U32CopyOpt.pmask.qSetBit
15188// Set bit # BIT_IDX in bit set. No bounds checking
15189inline void fasttest::pmask_qSetBit(fasttest::U32CopyOpt& parent, u32 bit_idx) {
15190    u64 elem_idx = bit_idx >> 5;
15191    u64 shift = bit_idx & 31;
15192    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15193    elem = elem | (u32(1) << shift); // set bit
15194}
15195
15196// --- fasttest.U32CopyOpt.pmask.SetBit
15197// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
15198inline void fasttest::pmask_SetBit(fasttest::U32CopyOpt& parent, u32 bit_idx) {
15199    u64 elem_idx = bit_idx >> 5;
15200    u64 shift = bit_idx & 31;
15201    u64 lim = pmask_N(parent);
15202    if (elem_idx < lim) {
15203        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15204        elem = elem | (u32(1) << shift); // set bit
15205    }
15206}
15207
15208// --- fasttest.U32CopyOpt.pmask.qSetBitVal
15209// Set bit # BIT_IDX in bit set. No bounds checking
15210inline void fasttest::pmask_qSetBitVal(fasttest::U32CopyOpt& parent, u32 bit_idx, bool val) {
15211    u64 elem_idx = bit_idx >> 5;
15212    u64 shift = bit_idx & 31;
15213    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15214    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
15215}
15216
15217// --- fasttest.U32CopyOpt.pmask.qOrBitVal
15218// Or bit # BIT_IDX in bit set. No bounds checking
15219inline void fasttest::pmask_qOrBitVal(fasttest::U32CopyOpt& parent, u32 bit_idx, bool val) {
15220    u64 elem_idx = bit_idx >> 5;
15221    u64 shift = bit_idx & 31;
15222    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15223    elem = elem | (u32(val) << shift); // Or in val into elem
15224}
15225
15226// --- fasttest.U32CopyOpt.pmask.ClearBitsAll
15227// Set all bits of array to zero.
15228// Note: this does not change what NBits will return.
15229inline void fasttest::pmask_ClearBitsAll(fasttest::U32CopyOpt& parent) {
15230    u64 n = pmask_N(parent);
15231    for (u64 i = 0; i < n; i++) {
15232        pmask_qFind(parent, i) = 0;
15233    }
15234}
15235
15236// --- fasttest.U32CopyOpt.pmask.ClearBits
15237// Zero in PARENT any bits that are set in RHS.
15238inline void fasttest::pmask_ClearBits(fasttest::U32CopyOpt& parent, fasttest::U32CopyOpt &rhs) {
15239    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
15240    for (u64 i = 0; i < n; i++) {
15241        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
15242    }
15243}
15244
15245// --- fasttest.U32CopyOpt.pmask.OrBits
15246// Set PARENT to union of two bitsets.
15247// (This function is not named Set.. to avoid triple entendre).
15248inline void fasttest::pmask_OrBits(fasttest::U32CopyOpt& parent, fasttest::U32CopyOpt &rhs) {
15249    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
15250    for (u64 i = 0; i < n; i++) {
15251        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
15252    }
15253}
15254
15255// --- fasttest.U32CopyOpt.pmask.Sup
15256// Return smallest number N such that indexes of all 1 bits are below N
15257inline i32 fasttest::pmask_Sup(fasttest::U32CopyOpt& parent) {
15258    u64 lim = pmask_N(parent);
15259    i32 ret = 0;
15260    for (int i = lim-1; i >= 0; i--) {
15261        u32 &val = pmask_qFind(parent, i);
15262        if (val) {
15263            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
15264            ret = i * 32 + bitidx;
15265            break;
15266        }
15267    }
15268    return ret;
15269}
15270
15271// --- fasttest.U32CopyOpt.Value53.PresentQ
15272// Return true if the field is marked in the presence mask
15273inline bool fasttest::Value53_PresentQ(fasttest::U32CopyOpt& parent) {
15274    return pmask_qGetBit(parent, 0);
15275}
15276
15277// --- fasttest.U32CopyOpt.Value53.SetPresent
15278// Set presence bit for this field in the pmask
15279inline void fasttest::Value53_SetPresent(fasttest::U32CopyOpt& parent) {
15280    pmask_qSetBit(parent, 0); // mark presence in pmask
15281}
15282
15283// --- fasttest.U32CopyOpt.Value53.Present_GetBit
15284// Return field's bit number in the pmask
15285inline int fasttest::Value53_Present_GetBit(fasttest::U32CopyOpt& parent) {
15286    int retval = 0;
15287    (void)parent;//only to avoid -Wunused-parameter
15288    return retval;
15289}
15290
15291// --- fasttest.U32CopyOpt.Value53.Set
15292inline void fasttest::Value53_Set(fasttest::U32CopyOpt& parent, u32 rhs) {
15293    parent.Value53 = rhs;
15294    pmask_qSetBit(parent, 0); // mark presence in pmask
15295}
15296
15297// --- fasttest.U32CopyOpt.pmask_bitcurs.Reset
15298inline void fasttest::U32CopyOpt_pmask_bitcurs_Reset(U32CopyOpt_pmask_bitcurs &curs, fasttest::U32CopyOpt &parent) {
15299    curs.elems = &pmask_qFind(parent,0);
15300    curs.n_elems = pmask_N(parent);
15301    curs.bit = -1;
15302    U32CopyOpt_pmask_bitcurs_Next(curs);
15303}
15304
15305// --- fasttest.U32CopyOpt.pmask_bitcurs.ValidQ
15306// cursor points to valid item
15307inline bool fasttest::U32CopyOpt_pmask_bitcurs_ValidQ(U32CopyOpt_pmask_bitcurs &curs) {
15308    return curs.bit < curs.n_elems*32;
15309}
15310
15311// --- fasttest.U32CopyOpt.pmask_bitcurs.Access
15312// item access
15313inline int& fasttest::U32CopyOpt_pmask_bitcurs_Access(U32CopyOpt_pmask_bitcurs &curs) {
15314    return curs.bit;
15315}
15316
15317// --- fasttest.U32CopyOpt..GetMsgLength
15318// Message length (uses length field)
15319inline i32 fasttest::GetMsgLength(const fasttest::U32CopyOpt& parent) {
15320    return i32(const_cast<fasttest::U32CopyOpt&>(parent).length);
15321}
15322
15323// --- fasttest.U32CopyOpt..GetMsgMemptr
15324// Memptr encompassing the message (uses length field)
15325inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32CopyOpt& row) {
15326    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32CopyOpt&>(row).length));
15327}
15328
15329// --- fasttest.U32CopyOpt..Init
15330// Set all fields to initial values.
15331inline void fasttest::U32CopyOpt_Init(fasttest::U32CopyOpt& parent) {
15332    parent.length = u32(ssizeof(parent) + (0));
15333    parent.id = u32(53);
15334    parent.pmask = u32(0);
15335    parent.Value53 = u32(53);
15336}
15337inline fasttest::U32Delta::U32Delta() {
15338    fasttest::U32Delta_Init(*this);
15339}
15340
15341
15342// --- fasttest.U32Delta.base.Castdown
15343// Check if fasttest::TemplateHeader is an instance of U32Delta by checking the type field
15344// If it is, return the pointer of target type.
15345// Additionally, check if the length field permits valid instance of U32Delta.
15346// If not successful, quietly return NULL.
15347inline fasttest::U32Delta* fasttest::U32Delta_Castdown(fasttest::TemplateHeader &hdr) {
15348    bool cond = hdr.id == (69);
15349    cond &= i32(hdr.length) >= ssizeof(fasttest::U32Delta);
15350    return cond ? reinterpret_cast<fasttest::U32Delta*>(&hdr) : NULL;
15351}
15352
15353// --- fasttest.U32Delta.base.Castbase
15354inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32Delta& parent) {
15355    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
15356}
15357
15358// --- fasttest.U32Delta..GetMsgLength
15359// Message length (uses length field)
15360inline i32 fasttest::GetMsgLength(const fasttest::U32Delta& parent) {
15361    return i32(const_cast<fasttest::U32Delta&>(parent).length);
15362}
15363
15364// --- fasttest.U32Delta..GetMsgMemptr
15365// Memptr encompassing the message (uses length field)
15366inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32Delta& row) {
15367    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32Delta&>(row).length));
15368}
15369
15370// --- fasttest.U32Delta..Init
15371// Set all fields to initial values.
15372inline void fasttest::U32Delta_Init(fasttest::U32Delta& parent) {
15373    parent.length = u32(ssizeof(parent) + (0));
15374    parent.id = u32(69);
15375    parent.Value69 = u32(69);
15376}
15377inline fasttest::U32DeltaImpl::U32DeltaImpl() {
15378    fasttest::U32DeltaImpl_Init(*this);
15379}
15380
15381
15382// --- fasttest.U32DeltaImpl.base.Castdown
15383// Check if fasttest::TemplateHeader is an instance of U32DeltaImpl by checking the type field
15384// If it is, return the pointer of target type.
15385// Additionally, check if the length field permits valid instance of U32DeltaImpl.
15386// If not successful, quietly return NULL.
15387inline fasttest::U32DeltaImpl* fasttest::U32DeltaImpl_Castdown(fasttest::TemplateHeader &hdr) {
15388    bool cond = hdr.id == (70);
15389    cond &= i32(hdr.length) >= ssizeof(fasttest::U32DeltaImpl);
15390    return cond ? reinterpret_cast<fasttest::U32DeltaImpl*>(&hdr) : NULL;
15391}
15392
15393// --- fasttest.U32DeltaImpl.base.Castbase
15394inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32DeltaImpl& parent) {
15395    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
15396}
15397
15398// --- fasttest.U32DeltaImpl..GetMsgLength
15399// Message length (uses length field)
15400inline i32 fasttest::GetMsgLength(const fasttest::U32DeltaImpl& parent) {
15401    return i32(const_cast<fasttest::U32DeltaImpl&>(parent).length);
15402}
15403
15404// --- fasttest.U32DeltaImpl..GetMsgMemptr
15405// Memptr encompassing the message (uses length field)
15406inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32DeltaImpl& row) {
15407    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32DeltaImpl&>(row).length));
15408}
15409
15410// --- fasttest.U32DeltaImpl..Init
15411// Set all fields to initial values.
15412inline void fasttest::U32DeltaImpl_Init(fasttest::U32DeltaImpl& parent) {
15413    parent.length = u32(ssizeof(parent) + (0));
15414    parent.id = u32(70);
15415    parent.Value70 = u32(0);
15416}
15417inline fasttest::U32DeltaNull::U32DeltaNull() {
15418    fasttest::U32DeltaNull_Init(*this);
15419}
15420
15421
15422// --- fasttest.U32DeltaNull.base.Castdown
15423// Check if fasttest::TemplateHeader is an instance of U32DeltaNull by checking the type field
15424// If it is, return the pointer of target type.
15425// Additionally, check if the length field permits valid instance of U32DeltaNull.
15426// If not successful, quietly return NULL.
15427inline fasttest::U32DeltaNull* fasttest::U32DeltaNull_Castdown(fasttest::TemplateHeader &hdr) {
15428    bool cond = hdr.id == (72);
15429    cond &= i32(hdr.length) >= ssizeof(fasttest::U32DeltaNull);
15430    return cond ? reinterpret_cast<fasttest::U32DeltaNull*>(&hdr) : NULL;
15431}
15432
15433// --- fasttest.U32DeltaNull.base.Castbase
15434inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32DeltaNull& parent) {
15435    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
15436}
15437
15438// --- fasttest.U32DeltaNull.pmask.N
15439// Return constant 1
15440inline int fasttest::pmask_N(fasttest::U32DeltaNull& parent) {
15441    (void)parent;
15442    return 1;
15443}
15444
15445// --- fasttest.U32DeltaNull.pmask.qFind
15446// Access value
15447inline u32& fasttest::pmask_qFind(fasttest::U32DeltaNull& parent, int) {
15448    return parent.pmask;
15449}
15450
15451// --- fasttest.U32DeltaNull.pmask.NBits
15452// Get max # of bits in the bitset
15453// Return max. number of bits supported by array
15454inline int fasttest::pmask_Nbits(fasttest::U32DeltaNull& parent) {
15455    return pmask_N(parent) * 32;
15456}
15457
15458// --- fasttest.U32DeltaNull.pmask.qGetBit
15459// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
15460inline bool fasttest::pmask_qGetBit(fasttest::U32DeltaNull& parent, u32 bit_idx) {
15461    u64 elem_idx = bit_idx >> 5;
15462    u64 shift = bit_idx & 31;
15463    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
15464    return bool((elem >> shift) & 1); // extract bit
15465}
15466
15467// --- fasttest.U32DeltaNull.pmask.GetBit
15468// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
15469inline bool fasttest::pmask_GetBit(fasttest::U32DeltaNull& parent, u32 bit_idx) {
15470    u64 elem_idx = bit_idx >> 5;
15471    u64 shift = bit_idx & 31;
15472    bool ret = false;
15473    u64 lim = pmask_N(parent);
15474    if (elem_idx < lim) {
15475        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
15476        ret = (elem >> shift) & 1;                 // extract bit
15477    }
15478    return ret;
15479}
15480
15481// --- fasttest.U32DeltaNull.pmask.BitsEmptyQ
15482// Check if all the bits in the bitset are equal to zero
15483inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32DeltaNull& parent) {
15484    bool retval = true;
15485    u64 n = pmask_N(parent);
15486    for (u64 i = 0; i < n; i++) {
15487        if (pmask_qFind(parent,i) != 0) {
15488            retval = false;
15489            break;
15490        }
15491    }
15492    return retval;
15493}
15494
15495// --- fasttest.U32DeltaNull.pmask.Sum1s
15496inline u64 fasttest::pmask_Sum1s(fasttest::U32DeltaNull& parent) {
15497    u64 sum = 0;
15498    u64 n = pmask_N(parent);
15499    for (u64 i = 0; i < n; i++) {
15500        sum += algo::u32_Count1s(pmask_qFind(parent, i));
15501    }
15502    return sum;
15503}
15504
15505// --- fasttest.U32DeltaNull.pmask.qClearBit
15506// Clear bit # BIT_IDX in bit set. No bounds checking
15507inline void fasttest::pmask_qClearBit(fasttest::U32DeltaNull& parent, u32 bit_idx) {
15508    u64 elem_idx = bit_idx >> 5;
15509    u64 shift = bit_idx & 31;
15510    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15511    elem = elem & ~(u32(1) << shift); // clear bit
15512}
15513
15514// --- fasttest.U32DeltaNull.pmask.ClearBit
15515// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
15516inline void fasttest::pmask_ClearBit(fasttest::U32DeltaNull& parent, u32 bit_idx) {
15517    u64 elem_idx = bit_idx >> 5;
15518    u64 shift = bit_idx & 31;
15519    u64 lim = pmask_N(parent);
15520    if (elem_idx < lim) {
15521        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15522        elem = elem & ~(u32(1) << shift); // clear bit
15523    }
15524}
15525
15526// --- fasttest.U32DeltaNull.pmask.qSetBit
15527// Set bit # BIT_IDX in bit set. No bounds checking
15528inline void fasttest::pmask_qSetBit(fasttest::U32DeltaNull& parent, u32 bit_idx) {
15529    u64 elem_idx = bit_idx >> 5;
15530    u64 shift = bit_idx & 31;
15531    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15532    elem = elem | (u32(1) << shift); // set bit
15533}
15534
15535// --- fasttest.U32DeltaNull.pmask.SetBit
15536// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
15537inline void fasttest::pmask_SetBit(fasttest::U32DeltaNull& parent, u32 bit_idx) {
15538    u64 elem_idx = bit_idx >> 5;
15539    u64 shift = bit_idx & 31;
15540    u64 lim = pmask_N(parent);
15541    if (elem_idx < lim) {
15542        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15543        elem = elem | (u32(1) << shift); // set bit
15544    }
15545}
15546
15547// --- fasttest.U32DeltaNull.pmask.qSetBitVal
15548// Set bit # BIT_IDX in bit set. No bounds checking
15549inline void fasttest::pmask_qSetBitVal(fasttest::U32DeltaNull& parent, u32 bit_idx, bool val) {
15550    u64 elem_idx = bit_idx >> 5;
15551    u64 shift = bit_idx & 31;
15552    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15553    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
15554}
15555
15556// --- fasttest.U32DeltaNull.pmask.qOrBitVal
15557// Or bit # BIT_IDX in bit set. No bounds checking
15558inline void fasttest::pmask_qOrBitVal(fasttest::U32DeltaNull& parent, u32 bit_idx, bool val) {
15559    u64 elem_idx = bit_idx >> 5;
15560    u64 shift = bit_idx & 31;
15561    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15562    elem = elem | (u32(val) << shift); // Or in val into elem
15563}
15564
15565// --- fasttest.U32DeltaNull.pmask.ClearBitsAll
15566// Set all bits of array to zero.
15567// Note: this does not change what NBits will return.
15568inline void fasttest::pmask_ClearBitsAll(fasttest::U32DeltaNull& parent) {
15569    u64 n = pmask_N(parent);
15570    for (u64 i = 0; i < n; i++) {
15571        pmask_qFind(parent, i) = 0;
15572    }
15573}
15574
15575// --- fasttest.U32DeltaNull.pmask.ClearBits
15576// Zero in PARENT any bits that are set in RHS.
15577inline void fasttest::pmask_ClearBits(fasttest::U32DeltaNull& parent, fasttest::U32DeltaNull &rhs) {
15578    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
15579    for (u64 i = 0; i < n; i++) {
15580        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
15581    }
15582}
15583
15584// --- fasttest.U32DeltaNull.pmask.OrBits
15585// Set PARENT to union of two bitsets.
15586// (This function is not named Set.. to avoid triple entendre).
15587inline void fasttest::pmask_OrBits(fasttest::U32DeltaNull& parent, fasttest::U32DeltaNull &rhs) {
15588    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
15589    for (u64 i = 0; i < n; i++) {
15590        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
15591    }
15592}
15593
15594// --- fasttest.U32DeltaNull.pmask.Sup
15595// Return smallest number N such that indexes of all 1 bits are below N
15596inline i32 fasttest::pmask_Sup(fasttest::U32DeltaNull& parent) {
15597    u64 lim = pmask_N(parent);
15598    i32 ret = 0;
15599    for (int i = lim-1; i >= 0; i--) {
15600        u32 &val = pmask_qFind(parent, i);
15601        if (val) {
15602            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
15603            ret = i * 32 + bitidx;
15604            break;
15605        }
15606    }
15607    return ret;
15608}
15609
15610// --- fasttest.U32DeltaNull.Value72.PresentQ
15611// Return true if the field is marked in the presence mask
15612inline bool fasttest::Value72_PresentQ(fasttest::U32DeltaNull& parent) {
15613    return pmask_qGetBit(parent, 0);
15614}
15615
15616// --- fasttest.U32DeltaNull.Value72.SetPresent
15617// Set presence bit for this field in the pmask
15618inline void fasttest::Value72_SetPresent(fasttest::U32DeltaNull& parent) {
15619    pmask_qSetBit(parent, 0); // mark presence in pmask
15620}
15621
15622// --- fasttest.U32DeltaNull.Value72.Present_GetBit
15623// Return field's bit number in the pmask
15624inline int fasttest::Value72_Present_GetBit(fasttest::U32DeltaNull& parent) {
15625    int retval = 0;
15626    (void)parent;//only to avoid -Wunused-parameter
15627    return retval;
15628}
15629
15630// --- fasttest.U32DeltaNull.Value72.Set
15631inline void fasttest::Value72_Set(fasttest::U32DeltaNull& parent, u32 rhs) {
15632    parent.Value72 = rhs;
15633    pmask_qSetBit(parent, 0); // mark presence in pmask
15634}
15635
15636// --- fasttest.U32DeltaNull.pmask_bitcurs.Reset
15637inline void fasttest::U32DeltaNull_pmask_bitcurs_Reset(U32DeltaNull_pmask_bitcurs &curs, fasttest::U32DeltaNull &parent) {
15638    curs.elems = &pmask_qFind(parent,0);
15639    curs.n_elems = pmask_N(parent);
15640    curs.bit = -1;
15641    U32DeltaNull_pmask_bitcurs_Next(curs);
15642}
15643
15644// --- fasttest.U32DeltaNull.pmask_bitcurs.ValidQ
15645// cursor points to valid item
15646inline bool fasttest::U32DeltaNull_pmask_bitcurs_ValidQ(U32DeltaNull_pmask_bitcurs &curs) {
15647    return curs.bit < curs.n_elems*32;
15648}
15649
15650// --- fasttest.U32DeltaNull.pmask_bitcurs.Access
15651// item access
15652inline int& fasttest::U32DeltaNull_pmask_bitcurs_Access(U32DeltaNull_pmask_bitcurs &curs) {
15653    return curs.bit;
15654}
15655
15656// --- fasttest.U32DeltaNull..GetMsgLength
15657// Message length (uses length field)
15658inline i32 fasttest::GetMsgLength(const fasttest::U32DeltaNull& parent) {
15659    return i32(const_cast<fasttest::U32DeltaNull&>(parent).length);
15660}
15661
15662// --- fasttest.U32DeltaNull..GetMsgMemptr
15663// Memptr encompassing the message (uses length field)
15664inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32DeltaNull& row) {
15665    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32DeltaNull&>(row).length));
15666}
15667
15668// --- fasttest.U32DeltaNull..Init
15669// Set all fields to initial values.
15670inline void fasttest::U32DeltaNull_Init(fasttest::U32DeltaNull& parent) {
15671    parent.length = u32(ssizeof(parent) + (0));
15672    parent.id = u32(72);
15673    parent.pmask = u32(0);
15674    parent.Value72 = u32(0);
15675}
15676inline fasttest::U32DeltaOpt::U32DeltaOpt() {
15677    fasttest::U32DeltaOpt_Init(*this);
15678}
15679
15680
15681// --- fasttest.U32DeltaOpt.base.Castdown
15682// Check if fasttest::TemplateHeader is an instance of U32DeltaOpt by checking the type field
15683// If it is, return the pointer of target type.
15684// Additionally, check if the length field permits valid instance of U32DeltaOpt.
15685// If not successful, quietly return NULL.
15686inline fasttest::U32DeltaOpt* fasttest::U32DeltaOpt_Castdown(fasttest::TemplateHeader &hdr) {
15687    bool cond = hdr.id == (71);
15688    cond &= i32(hdr.length) >= ssizeof(fasttest::U32DeltaOpt);
15689    return cond ? reinterpret_cast<fasttest::U32DeltaOpt*>(&hdr) : NULL;
15690}
15691
15692// --- fasttest.U32DeltaOpt.base.Castbase
15693inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32DeltaOpt& parent) {
15694    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
15695}
15696
15697// --- fasttest.U32DeltaOpt.pmask.N
15698// Return constant 1
15699inline int fasttest::pmask_N(fasttest::U32DeltaOpt& parent) {
15700    (void)parent;
15701    return 1;
15702}
15703
15704// --- fasttest.U32DeltaOpt.pmask.qFind
15705// Access value
15706inline u32& fasttest::pmask_qFind(fasttest::U32DeltaOpt& parent, int) {
15707    return parent.pmask;
15708}
15709
15710// --- fasttest.U32DeltaOpt.pmask.NBits
15711// Get max # of bits in the bitset
15712// Return max. number of bits supported by array
15713inline int fasttest::pmask_Nbits(fasttest::U32DeltaOpt& parent) {
15714    return pmask_N(parent) * 32;
15715}
15716
15717// --- fasttest.U32DeltaOpt.pmask.qGetBit
15718// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
15719inline bool fasttest::pmask_qGetBit(fasttest::U32DeltaOpt& parent, u32 bit_idx) {
15720    u64 elem_idx = bit_idx >> 5;
15721    u64 shift = bit_idx & 31;
15722    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
15723    return bool((elem >> shift) & 1); // extract bit
15724}
15725
15726// --- fasttest.U32DeltaOpt.pmask.GetBit
15727// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
15728inline bool fasttest::pmask_GetBit(fasttest::U32DeltaOpt& parent, u32 bit_idx) {
15729    u64 elem_idx = bit_idx >> 5;
15730    u64 shift = bit_idx & 31;
15731    bool ret = false;
15732    u64 lim = pmask_N(parent);
15733    if (elem_idx < lim) {
15734        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
15735        ret = (elem >> shift) & 1;                 // extract bit
15736    }
15737    return ret;
15738}
15739
15740// --- fasttest.U32DeltaOpt.pmask.BitsEmptyQ
15741// Check if all the bits in the bitset are equal to zero
15742inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32DeltaOpt& parent) {
15743    bool retval = true;
15744    u64 n = pmask_N(parent);
15745    for (u64 i = 0; i < n; i++) {
15746        if (pmask_qFind(parent,i) != 0) {
15747            retval = false;
15748            break;
15749        }
15750    }
15751    return retval;
15752}
15753
15754// --- fasttest.U32DeltaOpt.pmask.Sum1s
15755inline u64 fasttest::pmask_Sum1s(fasttest::U32DeltaOpt& parent) {
15756    u64 sum = 0;
15757    u64 n = pmask_N(parent);
15758    for (u64 i = 0; i < n; i++) {
15759        sum += algo::u32_Count1s(pmask_qFind(parent, i));
15760    }
15761    return sum;
15762}
15763
15764// --- fasttest.U32DeltaOpt.pmask.qClearBit
15765// Clear bit # BIT_IDX in bit set. No bounds checking
15766inline void fasttest::pmask_qClearBit(fasttest::U32DeltaOpt& parent, u32 bit_idx) {
15767    u64 elem_idx = bit_idx >> 5;
15768    u64 shift = bit_idx & 31;
15769    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15770    elem = elem & ~(u32(1) << shift); // clear bit
15771}
15772
15773// --- fasttest.U32DeltaOpt.pmask.ClearBit
15774// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
15775inline void fasttest::pmask_ClearBit(fasttest::U32DeltaOpt& parent, u32 bit_idx) {
15776    u64 elem_idx = bit_idx >> 5;
15777    u64 shift = bit_idx & 31;
15778    u64 lim = pmask_N(parent);
15779    if (elem_idx < lim) {
15780        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15781        elem = elem & ~(u32(1) << shift); // clear bit
15782    }
15783}
15784
15785// --- fasttest.U32DeltaOpt.pmask.qSetBit
15786// Set bit # BIT_IDX in bit set. No bounds checking
15787inline void fasttest::pmask_qSetBit(fasttest::U32DeltaOpt& parent, u32 bit_idx) {
15788    u64 elem_idx = bit_idx >> 5;
15789    u64 shift = bit_idx & 31;
15790    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15791    elem = elem | (u32(1) << shift); // set bit
15792}
15793
15794// --- fasttest.U32DeltaOpt.pmask.SetBit
15795// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
15796inline void fasttest::pmask_SetBit(fasttest::U32DeltaOpt& parent, u32 bit_idx) {
15797    u64 elem_idx = bit_idx >> 5;
15798    u64 shift = bit_idx & 31;
15799    u64 lim = pmask_N(parent);
15800    if (elem_idx < lim) {
15801        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15802        elem = elem | (u32(1) << shift); // set bit
15803    }
15804}
15805
15806// --- fasttest.U32DeltaOpt.pmask.qSetBitVal
15807// Set bit # BIT_IDX in bit set. No bounds checking
15808inline void fasttest::pmask_qSetBitVal(fasttest::U32DeltaOpt& parent, u32 bit_idx, bool val) {
15809    u64 elem_idx = bit_idx >> 5;
15810    u64 shift = bit_idx & 31;
15811    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15812    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
15813}
15814
15815// --- fasttest.U32DeltaOpt.pmask.qOrBitVal
15816// Or bit # BIT_IDX in bit set. No bounds checking
15817inline void fasttest::pmask_qOrBitVal(fasttest::U32DeltaOpt& parent, u32 bit_idx, bool val) {
15818    u64 elem_idx = bit_idx >> 5;
15819    u64 shift = bit_idx & 31;
15820    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
15821    elem = elem | (u32(val) << shift); // Or in val into elem
15822}
15823
15824// --- fasttest.U32DeltaOpt.pmask.ClearBitsAll
15825// Set all bits of array to zero.
15826// Note: this does not change what NBits will return.
15827inline void fasttest::pmask_ClearBitsAll(fasttest::U32DeltaOpt& parent) {
15828    u64 n = pmask_N(parent);
15829    for (u64 i = 0; i < n; i++) {
15830        pmask_qFind(parent, i) = 0;
15831    }
15832}
15833
15834// --- fasttest.U32DeltaOpt.pmask.ClearBits
15835// Zero in PARENT any bits that are set in RHS.
15836inline void fasttest::pmask_ClearBits(fasttest::U32DeltaOpt& parent, fasttest::U32DeltaOpt &rhs) {
15837    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
15838    for (u64 i = 0; i < n; i++) {
15839        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
15840    }
15841}
15842
15843// --- fasttest.U32DeltaOpt.pmask.OrBits
15844// Set PARENT to union of two bitsets.
15845// (This function is not named Set.. to avoid triple entendre).
15846inline void fasttest::pmask_OrBits(fasttest::U32DeltaOpt& parent, fasttest::U32DeltaOpt &rhs) {
15847    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
15848    for (u64 i = 0; i < n; i++) {
15849        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
15850    }
15851}
15852
15853// --- fasttest.U32DeltaOpt.pmask.Sup
15854// Return smallest number N such that indexes of all 1 bits are below N
15855inline i32 fasttest::pmask_Sup(fasttest::U32DeltaOpt& parent) {
15856    u64 lim = pmask_N(parent);
15857    i32 ret = 0;
15858    for (int i = lim-1; i >= 0; i--) {
15859        u32 &val = pmask_qFind(parent, i);
15860        if (val) {
15861            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
15862            ret = i * 32 + bitidx;
15863            break;
15864        }
15865    }
15866    return ret;
15867}
15868
15869// --- fasttest.U32DeltaOpt.Value71.PresentQ
15870// Return true if the field is marked in the presence mask
15871inline bool fasttest::Value71_PresentQ(fasttest::U32DeltaOpt& parent) {
15872    return pmask_qGetBit(parent, 0);
15873}
15874
15875// --- fasttest.U32DeltaOpt.Value71.SetPresent
15876// Set presence bit for this field in the pmask
15877inline void fasttest::Value71_SetPresent(fasttest::U32DeltaOpt& parent) {
15878    pmask_qSetBit(parent, 0); // mark presence in pmask
15879}
15880
15881// --- fasttest.U32DeltaOpt.Value71.Present_GetBit
15882// Return field's bit number in the pmask
15883inline int fasttest::Value71_Present_GetBit(fasttest::U32DeltaOpt& parent) {
15884    int retval = 0;
15885    (void)parent;//only to avoid -Wunused-parameter
15886    return retval;
15887}
15888
15889// --- fasttest.U32DeltaOpt.Value71.Set
15890inline void fasttest::Value71_Set(fasttest::U32DeltaOpt& parent, u32 rhs) {
15891    parent.Value71 = rhs;
15892    pmask_qSetBit(parent, 0); // mark presence in pmask
15893}
15894
15895// --- fasttest.U32DeltaOpt.pmask_bitcurs.Reset
15896inline void fasttest::U32DeltaOpt_pmask_bitcurs_Reset(U32DeltaOpt_pmask_bitcurs &curs, fasttest::U32DeltaOpt &parent) {
15897    curs.elems = &pmask_qFind(parent,0);
15898    curs.n_elems = pmask_N(parent);
15899    curs.bit = -1;
15900    U32DeltaOpt_pmask_bitcurs_Next(curs);
15901}
15902
15903// --- fasttest.U32DeltaOpt.pmask_bitcurs.ValidQ
15904// cursor points to valid item
15905inline bool fasttest::U32DeltaOpt_pmask_bitcurs_ValidQ(U32DeltaOpt_pmask_bitcurs &curs) {
15906    return curs.bit < curs.n_elems*32;
15907}
15908
15909// --- fasttest.U32DeltaOpt.pmask_bitcurs.Access
15910// item access
15911inline int& fasttest::U32DeltaOpt_pmask_bitcurs_Access(U32DeltaOpt_pmask_bitcurs &curs) {
15912    return curs.bit;
15913}
15914
15915// --- fasttest.U32DeltaOpt..GetMsgLength
15916// Message length (uses length field)
15917inline i32 fasttest::GetMsgLength(const fasttest::U32DeltaOpt& parent) {
15918    return i32(const_cast<fasttest::U32DeltaOpt&>(parent).length);
15919}
15920
15921// --- fasttest.U32DeltaOpt..GetMsgMemptr
15922// Memptr encompassing the message (uses length field)
15923inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32DeltaOpt& row) {
15924    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32DeltaOpt&>(row).length));
15925}
15926
15927// --- fasttest.U32DeltaOpt..Init
15928// Set all fields to initial values.
15929inline void fasttest::U32DeltaOpt_Init(fasttest::U32DeltaOpt& parent) {
15930    parent.length = u32(ssizeof(parent) + (0));
15931    parent.id = u32(71);
15932    parent.pmask = u32(0);
15933    parent.Value71 = u32(71);
15934}
15935inline fasttest::U32Dflt::U32Dflt() {
15936    fasttest::U32Dflt_Init(*this);
15937}
15938
15939
15940// --- fasttest.U32Dflt.base.Castdown
15941// Check if fasttest::TemplateHeader is an instance of U32Dflt by checking the type field
15942// If it is, return the pointer of target type.
15943// Additionally, check if the length field permits valid instance of U32Dflt.
15944// If not successful, quietly return NULL.
15945inline fasttest::U32Dflt* fasttest::U32Dflt_Castdown(fasttest::TemplateHeader &hdr) {
15946    bool cond = hdr.id == (36);
15947    cond &= i32(hdr.length) >= ssizeof(fasttest::U32Dflt);
15948    return cond ? reinterpret_cast<fasttest::U32Dflt*>(&hdr) : NULL;
15949}
15950
15951// --- fasttest.U32Dflt.base.Castbase
15952inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32Dflt& parent) {
15953    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
15954}
15955
15956// --- fasttest.U32Dflt..GetMsgLength
15957// Message length (uses length field)
15958inline i32 fasttest::GetMsgLength(const fasttest::U32Dflt& parent) {
15959    return i32(const_cast<fasttest::U32Dflt&>(parent).length);
15960}
15961
15962// --- fasttest.U32Dflt..GetMsgMemptr
15963// Memptr encompassing the message (uses length field)
15964inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32Dflt& row) {
15965    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32Dflt&>(row).length));
15966}
15967
15968// --- fasttest.U32Dflt..Init
15969// Set all fields to initial values.
15970inline void fasttest::U32Dflt_Init(fasttest::U32Dflt& parent) {
15971    parent.length = u32(ssizeof(parent) + (0));
15972    parent.id = u32(36);
15973    parent.Value = u32(36);
15974}
15975inline fasttest::U32DfltNull::U32DfltNull() {
15976    fasttest::U32DfltNull_Init(*this);
15977}
15978
15979
15980// --- fasttest.U32DfltNull.base.Castdown
15981// Check if fasttest::TemplateHeader is an instance of U32DfltNull by checking the type field
15982// If it is, return the pointer of target type.
15983// Additionally, check if the length field permits valid instance of U32DfltNull.
15984// If not successful, quietly return NULL.
15985inline fasttest::U32DfltNull* fasttest::U32DfltNull_Castdown(fasttest::TemplateHeader &hdr) {
15986    bool cond = hdr.id == (38);
15987    cond &= i32(hdr.length) >= ssizeof(fasttest::U32DfltNull);
15988    return cond ? reinterpret_cast<fasttest::U32DfltNull*>(&hdr) : NULL;
15989}
15990
15991// --- fasttest.U32DfltNull.base.Castbase
15992inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32DfltNull& parent) {
15993    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
15994}
15995
15996// --- fasttest.U32DfltNull.pmask.N
15997// Return constant 1
15998inline int fasttest::pmask_N(fasttest::U32DfltNull& parent) {
15999    (void)parent;
16000    return 1;
16001}
16002
16003// --- fasttest.U32DfltNull.pmask.qFind
16004// Access value
16005inline u32& fasttest::pmask_qFind(fasttest::U32DfltNull& parent, int) {
16006    return parent.pmask;
16007}
16008
16009// --- fasttest.U32DfltNull.pmask.NBits
16010// Get max # of bits in the bitset
16011// Return max. number of bits supported by array
16012inline int fasttest::pmask_Nbits(fasttest::U32DfltNull& parent) {
16013    return pmask_N(parent) * 32;
16014}
16015
16016// --- fasttest.U32DfltNull.pmask.qGetBit
16017// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
16018inline bool fasttest::pmask_qGetBit(fasttest::U32DfltNull& parent, u32 bit_idx) {
16019    u64 elem_idx = bit_idx >> 5;
16020    u64 shift = bit_idx & 31;
16021    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16022    return bool((elem >> shift) & 1); // extract bit
16023}
16024
16025// --- fasttest.U32DfltNull.pmask.GetBit
16026// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
16027inline bool fasttest::pmask_GetBit(fasttest::U32DfltNull& parent, u32 bit_idx) {
16028    u64 elem_idx = bit_idx >> 5;
16029    u64 shift = bit_idx & 31;
16030    bool ret = false;
16031    u64 lim = pmask_N(parent);
16032    if (elem_idx < lim) {
16033        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16034        ret = (elem >> shift) & 1;                 // extract bit
16035    }
16036    return ret;
16037}
16038
16039// --- fasttest.U32DfltNull.pmask.BitsEmptyQ
16040// Check if all the bits in the bitset are equal to zero
16041inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32DfltNull& parent) {
16042    bool retval = true;
16043    u64 n = pmask_N(parent);
16044    for (u64 i = 0; i < n; i++) {
16045        if (pmask_qFind(parent,i) != 0) {
16046            retval = false;
16047            break;
16048        }
16049    }
16050    return retval;
16051}
16052
16053// --- fasttest.U32DfltNull.pmask.Sum1s
16054inline u64 fasttest::pmask_Sum1s(fasttest::U32DfltNull& parent) {
16055    u64 sum = 0;
16056    u64 n = pmask_N(parent);
16057    for (u64 i = 0; i < n; i++) {
16058        sum += algo::u32_Count1s(pmask_qFind(parent, i));
16059    }
16060    return sum;
16061}
16062
16063// --- fasttest.U32DfltNull.pmask.qClearBit
16064// Clear bit # BIT_IDX in bit set. No bounds checking
16065inline void fasttest::pmask_qClearBit(fasttest::U32DfltNull& parent, u32 bit_idx) {
16066    u64 elem_idx = bit_idx >> 5;
16067    u64 shift = bit_idx & 31;
16068    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16069    elem = elem & ~(u32(1) << shift); // clear bit
16070}
16071
16072// --- fasttest.U32DfltNull.pmask.ClearBit
16073// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
16074inline void fasttest::pmask_ClearBit(fasttest::U32DfltNull& parent, u32 bit_idx) {
16075    u64 elem_idx = bit_idx >> 5;
16076    u64 shift = bit_idx & 31;
16077    u64 lim = pmask_N(parent);
16078    if (elem_idx < lim) {
16079        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16080        elem = elem & ~(u32(1) << shift); // clear bit
16081    }
16082}
16083
16084// --- fasttest.U32DfltNull.pmask.qSetBit
16085// Set bit # BIT_IDX in bit set. No bounds checking
16086inline void fasttest::pmask_qSetBit(fasttest::U32DfltNull& parent, u32 bit_idx) {
16087    u64 elem_idx = bit_idx >> 5;
16088    u64 shift = bit_idx & 31;
16089    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16090    elem = elem | (u32(1) << shift); // set bit
16091}
16092
16093// --- fasttest.U32DfltNull.pmask.SetBit
16094// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
16095inline void fasttest::pmask_SetBit(fasttest::U32DfltNull& parent, u32 bit_idx) {
16096    u64 elem_idx = bit_idx >> 5;
16097    u64 shift = bit_idx & 31;
16098    u64 lim = pmask_N(parent);
16099    if (elem_idx < lim) {
16100        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16101        elem = elem | (u32(1) << shift); // set bit
16102    }
16103}
16104
16105// --- fasttest.U32DfltNull.pmask.qSetBitVal
16106// Set bit # BIT_IDX in bit set. No bounds checking
16107inline void fasttest::pmask_qSetBitVal(fasttest::U32DfltNull& parent, u32 bit_idx, bool val) {
16108    u64 elem_idx = bit_idx >> 5;
16109    u64 shift = bit_idx & 31;
16110    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16111    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
16112}
16113
16114// --- fasttest.U32DfltNull.pmask.qOrBitVal
16115// Or bit # BIT_IDX in bit set. No bounds checking
16116inline void fasttest::pmask_qOrBitVal(fasttest::U32DfltNull& parent, u32 bit_idx, bool val) {
16117    u64 elem_idx = bit_idx >> 5;
16118    u64 shift = bit_idx & 31;
16119    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16120    elem = elem | (u32(val) << shift); // Or in val into elem
16121}
16122
16123// --- fasttest.U32DfltNull.pmask.ClearBitsAll
16124// Set all bits of array to zero.
16125// Note: this does not change what NBits will return.
16126inline void fasttest::pmask_ClearBitsAll(fasttest::U32DfltNull& parent) {
16127    u64 n = pmask_N(parent);
16128    for (u64 i = 0; i < n; i++) {
16129        pmask_qFind(parent, i) = 0;
16130    }
16131}
16132
16133// --- fasttest.U32DfltNull.pmask.ClearBits
16134// Zero in PARENT any bits that are set in RHS.
16135inline void fasttest::pmask_ClearBits(fasttest::U32DfltNull& parent, fasttest::U32DfltNull &rhs) {
16136    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
16137    for (u64 i = 0; i < n; i++) {
16138        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
16139    }
16140}
16141
16142// --- fasttest.U32DfltNull.pmask.OrBits
16143// Set PARENT to union of two bitsets.
16144// (This function is not named Set.. to avoid triple entendre).
16145inline void fasttest::pmask_OrBits(fasttest::U32DfltNull& parent, fasttest::U32DfltNull &rhs) {
16146    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
16147    for (u64 i = 0; i < n; i++) {
16148        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
16149    }
16150}
16151
16152// --- fasttest.U32DfltNull.pmask.Sup
16153// Return smallest number N such that indexes of all 1 bits are below N
16154inline i32 fasttest::pmask_Sup(fasttest::U32DfltNull& parent) {
16155    u64 lim = pmask_N(parent);
16156    i32 ret = 0;
16157    for (int i = lim-1; i >= 0; i--) {
16158        u32 &val = pmask_qFind(parent, i);
16159        if (val) {
16160            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
16161            ret = i * 32 + bitidx;
16162            break;
16163        }
16164    }
16165    return ret;
16166}
16167
16168// --- fasttest.U32DfltNull.Value.PresentQ
16169// Return true if the field is marked in the presence mask
16170inline bool fasttest::Value_PresentQ(fasttest::U32DfltNull& parent) {
16171    return pmask_qGetBit(parent, 0);
16172}
16173
16174// --- fasttest.U32DfltNull.Value.SetPresent
16175// Set presence bit for this field in the pmask
16176inline void fasttest::Value_SetPresent(fasttest::U32DfltNull& parent) {
16177    pmask_qSetBit(parent, 0); // mark presence in pmask
16178}
16179
16180// --- fasttest.U32DfltNull.Value.Present_GetBit
16181// Return field's bit number in the pmask
16182inline int fasttest::Value_Present_GetBit(fasttest::U32DfltNull& parent) {
16183    int retval = 0;
16184    (void)parent;//only to avoid -Wunused-parameter
16185    return retval;
16186}
16187
16188// --- fasttest.U32DfltNull.Value.Set
16189inline void fasttest::Value_Set(fasttest::U32DfltNull& parent, u32 rhs) {
16190    parent.Value = rhs;
16191    pmask_qSetBit(parent, 0); // mark presence in pmask
16192}
16193
16194// --- fasttest.U32DfltNull.pmask_bitcurs.Reset
16195inline void fasttest::U32DfltNull_pmask_bitcurs_Reset(U32DfltNull_pmask_bitcurs &curs, fasttest::U32DfltNull &parent) {
16196    curs.elems = &pmask_qFind(parent,0);
16197    curs.n_elems = pmask_N(parent);
16198    curs.bit = -1;
16199    U32DfltNull_pmask_bitcurs_Next(curs);
16200}
16201
16202// --- fasttest.U32DfltNull.pmask_bitcurs.ValidQ
16203// cursor points to valid item
16204inline bool fasttest::U32DfltNull_pmask_bitcurs_ValidQ(U32DfltNull_pmask_bitcurs &curs) {
16205    return curs.bit < curs.n_elems*32;
16206}
16207
16208// --- fasttest.U32DfltNull.pmask_bitcurs.Access
16209// item access
16210inline int& fasttest::U32DfltNull_pmask_bitcurs_Access(U32DfltNull_pmask_bitcurs &curs) {
16211    return curs.bit;
16212}
16213
16214// --- fasttest.U32DfltNull..GetMsgLength
16215// Message length (uses length field)
16216inline i32 fasttest::GetMsgLength(const fasttest::U32DfltNull& parent) {
16217    return i32(const_cast<fasttest::U32DfltNull&>(parent).length);
16218}
16219
16220// --- fasttest.U32DfltNull..GetMsgMemptr
16221// Memptr encompassing the message (uses length field)
16222inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32DfltNull& row) {
16223    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32DfltNull&>(row).length));
16224}
16225
16226// --- fasttest.U32DfltNull..Init
16227// Set all fields to initial values.
16228inline void fasttest::U32DfltNull_Init(fasttest::U32DfltNull& parent) {
16229    parent.length = u32(ssizeof(parent) + (0));
16230    parent.id = u32(38);
16231    parent.pmask = u32(0);
16232    parent.Value = u32(0);
16233}
16234inline fasttest::U32DfltOpt::U32DfltOpt() {
16235    fasttest::U32DfltOpt_Init(*this);
16236}
16237
16238
16239// --- fasttest.U32DfltOpt.base.Castdown
16240// Check if fasttest::TemplateHeader is an instance of U32DfltOpt by checking the type field
16241// If it is, return the pointer of target type.
16242// Additionally, check if the length field permits valid instance of U32DfltOpt.
16243// If not successful, quietly return NULL.
16244inline fasttest::U32DfltOpt* fasttest::U32DfltOpt_Castdown(fasttest::TemplateHeader &hdr) {
16245    bool cond = hdr.id == (37);
16246    cond &= i32(hdr.length) >= ssizeof(fasttest::U32DfltOpt);
16247    return cond ? reinterpret_cast<fasttest::U32DfltOpt*>(&hdr) : NULL;
16248}
16249
16250// --- fasttest.U32DfltOpt.base.Castbase
16251inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32DfltOpt& parent) {
16252    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
16253}
16254
16255// --- fasttest.U32DfltOpt.pmask.N
16256// Return constant 1
16257inline int fasttest::pmask_N(fasttest::U32DfltOpt& parent) {
16258    (void)parent;
16259    return 1;
16260}
16261
16262// --- fasttest.U32DfltOpt.pmask.qFind
16263// Access value
16264inline u32& fasttest::pmask_qFind(fasttest::U32DfltOpt& parent, int) {
16265    return parent.pmask;
16266}
16267
16268// --- fasttest.U32DfltOpt.pmask.NBits
16269// Get max # of bits in the bitset
16270// Return max. number of bits supported by array
16271inline int fasttest::pmask_Nbits(fasttest::U32DfltOpt& parent) {
16272    return pmask_N(parent) * 32;
16273}
16274
16275// --- fasttest.U32DfltOpt.pmask.qGetBit
16276// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
16277inline bool fasttest::pmask_qGetBit(fasttest::U32DfltOpt& parent, u32 bit_idx) {
16278    u64 elem_idx = bit_idx >> 5;
16279    u64 shift = bit_idx & 31;
16280    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16281    return bool((elem >> shift) & 1); // extract bit
16282}
16283
16284// --- fasttest.U32DfltOpt.pmask.GetBit
16285// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
16286inline bool fasttest::pmask_GetBit(fasttest::U32DfltOpt& parent, u32 bit_idx) {
16287    u64 elem_idx = bit_idx >> 5;
16288    u64 shift = bit_idx & 31;
16289    bool ret = false;
16290    u64 lim = pmask_N(parent);
16291    if (elem_idx < lim) {
16292        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16293        ret = (elem >> shift) & 1;                 // extract bit
16294    }
16295    return ret;
16296}
16297
16298// --- fasttest.U32DfltOpt.pmask.BitsEmptyQ
16299// Check if all the bits in the bitset are equal to zero
16300inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32DfltOpt& parent) {
16301    bool retval = true;
16302    u64 n = pmask_N(parent);
16303    for (u64 i = 0; i < n; i++) {
16304        if (pmask_qFind(parent,i) != 0) {
16305            retval = false;
16306            break;
16307        }
16308    }
16309    return retval;
16310}
16311
16312// --- fasttest.U32DfltOpt.pmask.Sum1s
16313inline u64 fasttest::pmask_Sum1s(fasttest::U32DfltOpt& parent) {
16314    u64 sum = 0;
16315    u64 n = pmask_N(parent);
16316    for (u64 i = 0; i < n; i++) {
16317        sum += algo::u32_Count1s(pmask_qFind(parent, i));
16318    }
16319    return sum;
16320}
16321
16322// --- fasttest.U32DfltOpt.pmask.qClearBit
16323// Clear bit # BIT_IDX in bit set. No bounds checking
16324inline void fasttest::pmask_qClearBit(fasttest::U32DfltOpt& parent, u32 bit_idx) {
16325    u64 elem_idx = bit_idx >> 5;
16326    u64 shift = bit_idx & 31;
16327    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16328    elem = elem & ~(u32(1) << shift); // clear bit
16329}
16330
16331// --- fasttest.U32DfltOpt.pmask.ClearBit
16332// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
16333inline void fasttest::pmask_ClearBit(fasttest::U32DfltOpt& parent, u32 bit_idx) {
16334    u64 elem_idx = bit_idx >> 5;
16335    u64 shift = bit_idx & 31;
16336    u64 lim = pmask_N(parent);
16337    if (elem_idx < lim) {
16338        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16339        elem = elem & ~(u32(1) << shift); // clear bit
16340    }
16341}
16342
16343// --- fasttest.U32DfltOpt.pmask.qSetBit
16344// Set bit # BIT_IDX in bit set. No bounds checking
16345inline void fasttest::pmask_qSetBit(fasttest::U32DfltOpt& parent, u32 bit_idx) {
16346    u64 elem_idx = bit_idx >> 5;
16347    u64 shift = bit_idx & 31;
16348    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16349    elem = elem | (u32(1) << shift); // set bit
16350}
16351
16352// --- fasttest.U32DfltOpt.pmask.SetBit
16353// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
16354inline void fasttest::pmask_SetBit(fasttest::U32DfltOpt& parent, u32 bit_idx) {
16355    u64 elem_idx = bit_idx >> 5;
16356    u64 shift = bit_idx & 31;
16357    u64 lim = pmask_N(parent);
16358    if (elem_idx < lim) {
16359        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16360        elem = elem | (u32(1) << shift); // set bit
16361    }
16362}
16363
16364// --- fasttest.U32DfltOpt.pmask.qSetBitVal
16365// Set bit # BIT_IDX in bit set. No bounds checking
16366inline void fasttest::pmask_qSetBitVal(fasttest::U32DfltOpt& parent, u32 bit_idx, bool val) {
16367    u64 elem_idx = bit_idx >> 5;
16368    u64 shift = bit_idx & 31;
16369    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16370    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
16371}
16372
16373// --- fasttest.U32DfltOpt.pmask.qOrBitVal
16374// Or bit # BIT_IDX in bit set. No bounds checking
16375inline void fasttest::pmask_qOrBitVal(fasttest::U32DfltOpt& parent, u32 bit_idx, bool val) {
16376    u64 elem_idx = bit_idx >> 5;
16377    u64 shift = bit_idx & 31;
16378    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16379    elem = elem | (u32(val) << shift); // Or in val into elem
16380}
16381
16382// --- fasttest.U32DfltOpt.pmask.ClearBitsAll
16383// Set all bits of array to zero.
16384// Note: this does not change what NBits will return.
16385inline void fasttest::pmask_ClearBitsAll(fasttest::U32DfltOpt& parent) {
16386    u64 n = pmask_N(parent);
16387    for (u64 i = 0; i < n; i++) {
16388        pmask_qFind(parent, i) = 0;
16389    }
16390}
16391
16392// --- fasttest.U32DfltOpt.pmask.ClearBits
16393// Zero in PARENT any bits that are set in RHS.
16394inline void fasttest::pmask_ClearBits(fasttest::U32DfltOpt& parent, fasttest::U32DfltOpt &rhs) {
16395    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
16396    for (u64 i = 0; i < n; i++) {
16397        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
16398    }
16399}
16400
16401// --- fasttest.U32DfltOpt.pmask.OrBits
16402// Set PARENT to union of two bitsets.
16403// (This function is not named Set.. to avoid triple entendre).
16404inline void fasttest::pmask_OrBits(fasttest::U32DfltOpt& parent, fasttest::U32DfltOpt &rhs) {
16405    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
16406    for (u64 i = 0; i < n; i++) {
16407        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
16408    }
16409}
16410
16411// --- fasttest.U32DfltOpt.pmask.Sup
16412// Return smallest number N such that indexes of all 1 bits are below N
16413inline i32 fasttest::pmask_Sup(fasttest::U32DfltOpt& parent) {
16414    u64 lim = pmask_N(parent);
16415    i32 ret = 0;
16416    for (int i = lim-1; i >= 0; i--) {
16417        u32 &val = pmask_qFind(parent, i);
16418        if (val) {
16419            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
16420            ret = i * 32 + bitidx;
16421            break;
16422        }
16423    }
16424    return ret;
16425}
16426
16427// --- fasttest.U32DfltOpt.Value.PresentQ
16428// Return true if the field is marked in the presence mask
16429inline bool fasttest::Value_PresentQ(fasttest::U32DfltOpt& parent) {
16430    return pmask_qGetBit(parent, 0);
16431}
16432
16433// --- fasttest.U32DfltOpt.Value.SetPresent
16434// Set presence bit for this field in the pmask
16435inline void fasttest::Value_SetPresent(fasttest::U32DfltOpt& parent) {
16436    pmask_qSetBit(parent, 0); // mark presence in pmask
16437}
16438
16439// --- fasttest.U32DfltOpt.Value.Present_GetBit
16440// Return field's bit number in the pmask
16441inline int fasttest::Value_Present_GetBit(fasttest::U32DfltOpt& parent) {
16442    int retval = 0;
16443    (void)parent;//only to avoid -Wunused-parameter
16444    return retval;
16445}
16446
16447// --- fasttest.U32DfltOpt.Value.Set
16448inline void fasttest::Value_Set(fasttest::U32DfltOpt& parent, u32 rhs) {
16449    parent.Value = rhs;
16450    pmask_qSetBit(parent, 0); // mark presence in pmask
16451}
16452
16453// --- fasttest.U32DfltOpt.pmask_bitcurs.Reset
16454inline void fasttest::U32DfltOpt_pmask_bitcurs_Reset(U32DfltOpt_pmask_bitcurs &curs, fasttest::U32DfltOpt &parent) {
16455    curs.elems = &pmask_qFind(parent,0);
16456    curs.n_elems = pmask_N(parent);
16457    curs.bit = -1;
16458    U32DfltOpt_pmask_bitcurs_Next(curs);
16459}
16460
16461// --- fasttest.U32DfltOpt.pmask_bitcurs.ValidQ
16462// cursor points to valid item
16463inline bool fasttest::U32DfltOpt_pmask_bitcurs_ValidQ(U32DfltOpt_pmask_bitcurs &curs) {
16464    return curs.bit < curs.n_elems*32;
16465}
16466
16467// --- fasttest.U32DfltOpt.pmask_bitcurs.Access
16468// item access
16469inline int& fasttest::U32DfltOpt_pmask_bitcurs_Access(U32DfltOpt_pmask_bitcurs &curs) {
16470    return curs.bit;
16471}
16472
16473// --- fasttest.U32DfltOpt..GetMsgLength
16474// Message length (uses length field)
16475inline i32 fasttest::GetMsgLength(const fasttest::U32DfltOpt& parent) {
16476    return i32(const_cast<fasttest::U32DfltOpt&>(parent).length);
16477}
16478
16479// --- fasttest.U32DfltOpt..GetMsgMemptr
16480// Memptr encompassing the message (uses length field)
16481inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32DfltOpt& row) {
16482    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32DfltOpt&>(row).length));
16483}
16484
16485// --- fasttest.U32DfltOpt..Init
16486// Set all fields to initial values.
16487inline void fasttest::U32DfltOpt_Init(fasttest::U32DfltOpt& parent) {
16488    parent.length = u32(ssizeof(parent) + (0));
16489    parent.id = u32(37);
16490    parent.pmask = u32(0);
16491    parent.Value = u32(37);
16492}
16493inline fasttest::U32Incr::U32Incr() {
16494    fasttest::U32Incr_Init(*this);
16495}
16496
16497
16498// --- fasttest.U32Incr.base.Castdown
16499// Check if fasttest::TemplateHeader is an instance of U32Incr by checking the type field
16500// If it is, return the pointer of target type.
16501// Additionally, check if the length field permits valid instance of U32Incr.
16502// If not successful, quietly return NULL.
16503inline fasttest::U32Incr* fasttest::U32Incr_Castdown(fasttest::TemplateHeader &hdr) {
16504    bool cond = hdr.id == (101);
16505    cond &= i32(hdr.length) >= ssizeof(fasttest::U32Incr);
16506    return cond ? reinterpret_cast<fasttest::U32Incr*>(&hdr) : NULL;
16507}
16508
16509// --- fasttest.U32Incr.base.Castbase
16510inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32Incr& parent) {
16511    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
16512}
16513
16514// --- fasttest.U32Incr..GetMsgLength
16515// Message length (uses length field)
16516inline i32 fasttest::GetMsgLength(const fasttest::U32Incr& parent) {
16517    return i32(const_cast<fasttest::U32Incr&>(parent).length);
16518}
16519
16520// --- fasttest.U32Incr..GetMsgMemptr
16521// Memptr encompassing the message (uses length field)
16522inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32Incr& row) {
16523    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32Incr&>(row).length));
16524}
16525
16526// --- fasttest.U32Incr..Init
16527// Set all fields to initial values.
16528inline void fasttest::U32Incr_Init(fasttest::U32Incr& parent) {
16529    parent.length = u32(ssizeof(parent) + (0));
16530    parent.id = u32(101);
16531    parent.Value101 = u32(101);
16532}
16533inline fasttest::U32IncrNV::U32IncrNV() {
16534    fasttest::U32IncrNV_Init(*this);
16535}
16536
16537
16538// --- fasttest.U32IncrNV.base.Castdown
16539// Check if fasttest::TemplateHeader is an instance of U32IncrNV by checking the type field
16540// If it is, return the pointer of target type.
16541// Additionally, check if the length field permits valid instance of U32IncrNV.
16542// If not successful, quietly return NULL.
16543inline fasttest::U32IncrNV* fasttest::U32IncrNV_Castdown(fasttest::TemplateHeader &hdr) {
16544    bool cond = hdr.id == (102);
16545    cond &= i32(hdr.length) >= ssizeof(fasttest::U32IncrNV);
16546    return cond ? reinterpret_cast<fasttest::U32IncrNV*>(&hdr) : NULL;
16547}
16548
16549// --- fasttest.U32IncrNV.base.Castbase
16550inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32IncrNV& parent) {
16551    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
16552}
16553
16554// --- fasttest.U32IncrNV..GetMsgLength
16555// Message length (uses length field)
16556inline i32 fasttest::GetMsgLength(const fasttest::U32IncrNV& parent) {
16557    return i32(const_cast<fasttest::U32IncrNV&>(parent).length);
16558}
16559
16560// --- fasttest.U32IncrNV..GetMsgMemptr
16561// Memptr encompassing the message (uses length field)
16562inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32IncrNV& row) {
16563    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32IncrNV&>(row).length));
16564}
16565
16566// --- fasttest.U32IncrNV..Init
16567// Set all fields to initial values.
16568inline void fasttest::U32IncrNV_Init(fasttest::U32IncrNV& parent) {
16569    parent.length = u32(ssizeof(parent) + (0));
16570    parent.id = u32(102);
16571    parent.Value102 = u32(0);
16572}
16573inline fasttest::U32IncrNull::U32IncrNull() {
16574    fasttest::U32IncrNull_Init(*this);
16575}
16576
16577
16578// --- fasttest.U32IncrNull.base.Castdown
16579// Check if fasttest::TemplateHeader is an instance of U32IncrNull by checking the type field
16580// If it is, return the pointer of target type.
16581// Additionally, check if the length field permits valid instance of U32IncrNull.
16582// If not successful, quietly return NULL.
16583inline fasttest::U32IncrNull* fasttest::U32IncrNull_Castdown(fasttest::TemplateHeader &hdr) {
16584    bool cond = hdr.id == (104);
16585    cond &= i32(hdr.length) >= ssizeof(fasttest::U32IncrNull);
16586    return cond ? reinterpret_cast<fasttest::U32IncrNull*>(&hdr) : NULL;
16587}
16588
16589// --- fasttest.U32IncrNull.base.Castbase
16590inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32IncrNull& parent) {
16591    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
16592}
16593
16594// --- fasttest.U32IncrNull.pmask.N
16595// Return constant 1
16596inline int fasttest::pmask_N(fasttest::U32IncrNull& parent) {
16597    (void)parent;
16598    return 1;
16599}
16600
16601// --- fasttest.U32IncrNull.pmask.qFind
16602// Access value
16603inline u32& fasttest::pmask_qFind(fasttest::U32IncrNull& parent, int) {
16604    return parent.pmask;
16605}
16606
16607// --- fasttest.U32IncrNull.pmask.NBits
16608// Get max # of bits in the bitset
16609// Return max. number of bits supported by array
16610inline int fasttest::pmask_Nbits(fasttest::U32IncrNull& parent) {
16611    return pmask_N(parent) * 32;
16612}
16613
16614// --- fasttest.U32IncrNull.pmask.qGetBit
16615// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
16616inline bool fasttest::pmask_qGetBit(fasttest::U32IncrNull& parent, u32 bit_idx) {
16617    u64 elem_idx = bit_idx >> 5;
16618    u64 shift = bit_idx & 31;
16619    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16620    return bool((elem >> shift) & 1); // extract bit
16621}
16622
16623// --- fasttest.U32IncrNull.pmask.GetBit
16624// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
16625inline bool fasttest::pmask_GetBit(fasttest::U32IncrNull& parent, u32 bit_idx) {
16626    u64 elem_idx = bit_idx >> 5;
16627    u64 shift = bit_idx & 31;
16628    bool ret = false;
16629    u64 lim = pmask_N(parent);
16630    if (elem_idx < lim) {
16631        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16632        ret = (elem >> shift) & 1;                 // extract bit
16633    }
16634    return ret;
16635}
16636
16637// --- fasttest.U32IncrNull.pmask.BitsEmptyQ
16638// Check if all the bits in the bitset are equal to zero
16639inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32IncrNull& parent) {
16640    bool retval = true;
16641    u64 n = pmask_N(parent);
16642    for (u64 i = 0; i < n; i++) {
16643        if (pmask_qFind(parent,i) != 0) {
16644            retval = false;
16645            break;
16646        }
16647    }
16648    return retval;
16649}
16650
16651// --- fasttest.U32IncrNull.pmask.Sum1s
16652inline u64 fasttest::pmask_Sum1s(fasttest::U32IncrNull& parent) {
16653    u64 sum = 0;
16654    u64 n = pmask_N(parent);
16655    for (u64 i = 0; i < n; i++) {
16656        sum += algo::u32_Count1s(pmask_qFind(parent, i));
16657    }
16658    return sum;
16659}
16660
16661// --- fasttest.U32IncrNull.pmask.qClearBit
16662// Clear bit # BIT_IDX in bit set. No bounds checking
16663inline void fasttest::pmask_qClearBit(fasttest::U32IncrNull& parent, u32 bit_idx) {
16664    u64 elem_idx = bit_idx >> 5;
16665    u64 shift = bit_idx & 31;
16666    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16667    elem = elem & ~(u32(1) << shift); // clear bit
16668}
16669
16670// --- fasttest.U32IncrNull.pmask.ClearBit
16671// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
16672inline void fasttest::pmask_ClearBit(fasttest::U32IncrNull& parent, u32 bit_idx) {
16673    u64 elem_idx = bit_idx >> 5;
16674    u64 shift = bit_idx & 31;
16675    u64 lim = pmask_N(parent);
16676    if (elem_idx < lim) {
16677        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16678        elem = elem & ~(u32(1) << shift); // clear bit
16679    }
16680}
16681
16682// --- fasttest.U32IncrNull.pmask.qSetBit
16683// Set bit # BIT_IDX in bit set. No bounds checking
16684inline void fasttest::pmask_qSetBit(fasttest::U32IncrNull& parent, u32 bit_idx) {
16685    u64 elem_idx = bit_idx >> 5;
16686    u64 shift = bit_idx & 31;
16687    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16688    elem = elem | (u32(1) << shift); // set bit
16689}
16690
16691// --- fasttest.U32IncrNull.pmask.SetBit
16692// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
16693inline void fasttest::pmask_SetBit(fasttest::U32IncrNull& parent, u32 bit_idx) {
16694    u64 elem_idx = bit_idx >> 5;
16695    u64 shift = bit_idx & 31;
16696    u64 lim = pmask_N(parent);
16697    if (elem_idx < lim) {
16698        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16699        elem = elem | (u32(1) << shift); // set bit
16700    }
16701}
16702
16703// --- fasttest.U32IncrNull.pmask.qSetBitVal
16704// Set bit # BIT_IDX in bit set. No bounds checking
16705inline void fasttest::pmask_qSetBitVal(fasttest::U32IncrNull& parent, u32 bit_idx, bool val) {
16706    u64 elem_idx = bit_idx >> 5;
16707    u64 shift = bit_idx & 31;
16708    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16709    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
16710}
16711
16712// --- fasttest.U32IncrNull.pmask.qOrBitVal
16713// Or bit # BIT_IDX in bit set. No bounds checking
16714inline void fasttest::pmask_qOrBitVal(fasttest::U32IncrNull& parent, u32 bit_idx, bool val) {
16715    u64 elem_idx = bit_idx >> 5;
16716    u64 shift = bit_idx & 31;
16717    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16718    elem = elem | (u32(val) << shift); // Or in val into elem
16719}
16720
16721// --- fasttest.U32IncrNull.pmask.ClearBitsAll
16722// Set all bits of array to zero.
16723// Note: this does not change what NBits will return.
16724inline void fasttest::pmask_ClearBitsAll(fasttest::U32IncrNull& parent) {
16725    u64 n = pmask_N(parent);
16726    for (u64 i = 0; i < n; i++) {
16727        pmask_qFind(parent, i) = 0;
16728    }
16729}
16730
16731// --- fasttest.U32IncrNull.pmask.ClearBits
16732// Zero in PARENT any bits that are set in RHS.
16733inline void fasttest::pmask_ClearBits(fasttest::U32IncrNull& parent, fasttest::U32IncrNull &rhs) {
16734    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
16735    for (u64 i = 0; i < n; i++) {
16736        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
16737    }
16738}
16739
16740// --- fasttest.U32IncrNull.pmask.OrBits
16741// Set PARENT to union of two bitsets.
16742// (This function is not named Set.. to avoid triple entendre).
16743inline void fasttest::pmask_OrBits(fasttest::U32IncrNull& parent, fasttest::U32IncrNull &rhs) {
16744    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
16745    for (u64 i = 0; i < n; i++) {
16746        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
16747    }
16748}
16749
16750// --- fasttest.U32IncrNull.pmask.Sup
16751// Return smallest number N such that indexes of all 1 bits are below N
16752inline i32 fasttest::pmask_Sup(fasttest::U32IncrNull& parent) {
16753    u64 lim = pmask_N(parent);
16754    i32 ret = 0;
16755    for (int i = lim-1; i >= 0; i--) {
16756        u32 &val = pmask_qFind(parent, i);
16757        if (val) {
16758            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
16759            ret = i * 32 + bitidx;
16760            break;
16761        }
16762    }
16763    return ret;
16764}
16765
16766// --- fasttest.U32IncrNull.Value104.PresentQ
16767// Return true if the field is marked in the presence mask
16768inline bool fasttest::Value104_PresentQ(fasttest::U32IncrNull& parent) {
16769    return pmask_qGetBit(parent, 0);
16770}
16771
16772// --- fasttest.U32IncrNull.Value104.SetPresent
16773// Set presence bit for this field in the pmask
16774inline void fasttest::Value104_SetPresent(fasttest::U32IncrNull& parent) {
16775    pmask_qSetBit(parent, 0); // mark presence in pmask
16776}
16777
16778// --- fasttest.U32IncrNull.Value104.Present_GetBit
16779// Return field's bit number in the pmask
16780inline int fasttest::Value104_Present_GetBit(fasttest::U32IncrNull& parent) {
16781    int retval = 0;
16782    (void)parent;//only to avoid -Wunused-parameter
16783    return retval;
16784}
16785
16786// --- fasttest.U32IncrNull.Value104.Set
16787inline void fasttest::Value104_Set(fasttest::U32IncrNull& parent, u32 rhs) {
16788    parent.Value104 = rhs;
16789    pmask_qSetBit(parent, 0); // mark presence in pmask
16790}
16791
16792// --- fasttest.U32IncrNull.pmask_bitcurs.Reset
16793inline void fasttest::U32IncrNull_pmask_bitcurs_Reset(U32IncrNull_pmask_bitcurs &curs, fasttest::U32IncrNull &parent) {
16794    curs.elems = &pmask_qFind(parent,0);
16795    curs.n_elems = pmask_N(parent);
16796    curs.bit = -1;
16797    U32IncrNull_pmask_bitcurs_Next(curs);
16798}
16799
16800// --- fasttest.U32IncrNull.pmask_bitcurs.ValidQ
16801// cursor points to valid item
16802inline bool fasttest::U32IncrNull_pmask_bitcurs_ValidQ(U32IncrNull_pmask_bitcurs &curs) {
16803    return curs.bit < curs.n_elems*32;
16804}
16805
16806// --- fasttest.U32IncrNull.pmask_bitcurs.Access
16807// item access
16808inline int& fasttest::U32IncrNull_pmask_bitcurs_Access(U32IncrNull_pmask_bitcurs &curs) {
16809    return curs.bit;
16810}
16811
16812// --- fasttest.U32IncrNull..GetMsgLength
16813// Message length (uses length field)
16814inline i32 fasttest::GetMsgLength(const fasttest::U32IncrNull& parent) {
16815    return i32(const_cast<fasttest::U32IncrNull&>(parent).length);
16816}
16817
16818// --- fasttest.U32IncrNull..GetMsgMemptr
16819// Memptr encompassing the message (uses length field)
16820inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32IncrNull& row) {
16821    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32IncrNull&>(row).length));
16822}
16823
16824// --- fasttest.U32IncrNull..Init
16825// Set all fields to initial values.
16826inline void fasttest::U32IncrNull_Init(fasttest::U32IncrNull& parent) {
16827    parent.length = u32(ssizeof(parent) + (0));
16828    parent.id = u32(104);
16829    parent.pmask = u32(0);
16830    parent.Value104 = u32(0);
16831}
16832inline fasttest::U32IncrOpt::U32IncrOpt() {
16833    fasttest::U32IncrOpt_Init(*this);
16834}
16835
16836
16837// --- fasttest.U32IncrOpt.base.Castdown
16838// Check if fasttest::TemplateHeader is an instance of U32IncrOpt by checking the type field
16839// If it is, return the pointer of target type.
16840// Additionally, check if the length field permits valid instance of U32IncrOpt.
16841// If not successful, quietly return NULL.
16842inline fasttest::U32IncrOpt* fasttest::U32IncrOpt_Castdown(fasttest::TemplateHeader &hdr) {
16843    bool cond = hdr.id == (103);
16844    cond &= i32(hdr.length) >= ssizeof(fasttest::U32IncrOpt);
16845    return cond ? reinterpret_cast<fasttest::U32IncrOpt*>(&hdr) : NULL;
16846}
16847
16848// --- fasttest.U32IncrOpt.base.Castbase
16849inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32IncrOpt& parent) {
16850    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
16851}
16852
16853// --- fasttest.U32IncrOpt.pmask.N
16854// Return constant 1
16855inline int fasttest::pmask_N(fasttest::U32IncrOpt& parent) {
16856    (void)parent;
16857    return 1;
16858}
16859
16860// --- fasttest.U32IncrOpt.pmask.qFind
16861// Access value
16862inline u32& fasttest::pmask_qFind(fasttest::U32IncrOpt& parent, int) {
16863    return parent.pmask;
16864}
16865
16866// --- fasttest.U32IncrOpt.pmask.NBits
16867// Get max # of bits in the bitset
16868// Return max. number of bits supported by array
16869inline int fasttest::pmask_Nbits(fasttest::U32IncrOpt& parent) {
16870    return pmask_N(parent) * 32;
16871}
16872
16873// --- fasttest.U32IncrOpt.pmask.qGetBit
16874// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
16875inline bool fasttest::pmask_qGetBit(fasttest::U32IncrOpt& parent, u32 bit_idx) {
16876    u64 elem_idx = bit_idx >> 5;
16877    u64 shift = bit_idx & 31;
16878    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16879    return bool((elem >> shift) & 1); // extract bit
16880}
16881
16882// --- fasttest.U32IncrOpt.pmask.GetBit
16883// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
16884inline bool fasttest::pmask_GetBit(fasttest::U32IncrOpt& parent, u32 bit_idx) {
16885    u64 elem_idx = bit_idx >> 5;
16886    u64 shift = bit_idx & 31;
16887    bool ret = false;
16888    u64 lim = pmask_N(parent);
16889    if (elem_idx < lim) {
16890        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
16891        ret = (elem >> shift) & 1;                 // extract bit
16892    }
16893    return ret;
16894}
16895
16896// --- fasttest.U32IncrOpt.pmask.BitsEmptyQ
16897// Check if all the bits in the bitset are equal to zero
16898inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32IncrOpt& parent) {
16899    bool retval = true;
16900    u64 n = pmask_N(parent);
16901    for (u64 i = 0; i < n; i++) {
16902        if (pmask_qFind(parent,i) != 0) {
16903            retval = false;
16904            break;
16905        }
16906    }
16907    return retval;
16908}
16909
16910// --- fasttest.U32IncrOpt.pmask.Sum1s
16911inline u64 fasttest::pmask_Sum1s(fasttest::U32IncrOpt& parent) {
16912    u64 sum = 0;
16913    u64 n = pmask_N(parent);
16914    for (u64 i = 0; i < n; i++) {
16915        sum += algo::u32_Count1s(pmask_qFind(parent, i));
16916    }
16917    return sum;
16918}
16919
16920// --- fasttest.U32IncrOpt.pmask.qClearBit
16921// Clear bit # BIT_IDX in bit set. No bounds checking
16922inline void fasttest::pmask_qClearBit(fasttest::U32IncrOpt& parent, u32 bit_idx) {
16923    u64 elem_idx = bit_idx >> 5;
16924    u64 shift = bit_idx & 31;
16925    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16926    elem = elem & ~(u32(1) << shift); // clear bit
16927}
16928
16929// --- fasttest.U32IncrOpt.pmask.ClearBit
16930// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
16931inline void fasttest::pmask_ClearBit(fasttest::U32IncrOpt& parent, u32 bit_idx) {
16932    u64 elem_idx = bit_idx >> 5;
16933    u64 shift = bit_idx & 31;
16934    u64 lim = pmask_N(parent);
16935    if (elem_idx < lim) {
16936        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16937        elem = elem & ~(u32(1) << shift); // clear bit
16938    }
16939}
16940
16941// --- fasttest.U32IncrOpt.pmask.qSetBit
16942// Set bit # BIT_IDX in bit set. No bounds checking
16943inline void fasttest::pmask_qSetBit(fasttest::U32IncrOpt& parent, u32 bit_idx) {
16944    u64 elem_idx = bit_idx >> 5;
16945    u64 shift = bit_idx & 31;
16946    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16947    elem = elem | (u32(1) << shift); // set bit
16948}
16949
16950// --- fasttest.U32IncrOpt.pmask.SetBit
16951// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
16952inline void fasttest::pmask_SetBit(fasttest::U32IncrOpt& parent, u32 bit_idx) {
16953    u64 elem_idx = bit_idx >> 5;
16954    u64 shift = bit_idx & 31;
16955    u64 lim = pmask_N(parent);
16956    if (elem_idx < lim) {
16957        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16958        elem = elem | (u32(1) << shift); // set bit
16959    }
16960}
16961
16962// --- fasttest.U32IncrOpt.pmask.qSetBitVal
16963// Set bit # BIT_IDX in bit set. No bounds checking
16964inline void fasttest::pmask_qSetBitVal(fasttest::U32IncrOpt& parent, u32 bit_idx, bool val) {
16965    u64 elem_idx = bit_idx >> 5;
16966    u64 shift = bit_idx & 31;
16967    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16968    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
16969}
16970
16971// --- fasttest.U32IncrOpt.pmask.qOrBitVal
16972// Or bit # BIT_IDX in bit set. No bounds checking
16973inline void fasttest::pmask_qOrBitVal(fasttest::U32IncrOpt& parent, u32 bit_idx, bool val) {
16974    u64 elem_idx = bit_idx >> 5;
16975    u64 shift = bit_idx & 31;
16976    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
16977    elem = elem | (u32(val) << shift); // Or in val into elem
16978}
16979
16980// --- fasttest.U32IncrOpt.pmask.ClearBitsAll
16981// Set all bits of array to zero.
16982// Note: this does not change what NBits will return.
16983inline void fasttest::pmask_ClearBitsAll(fasttest::U32IncrOpt& parent) {
16984    u64 n = pmask_N(parent);
16985    for (u64 i = 0; i < n; i++) {
16986        pmask_qFind(parent, i) = 0;
16987    }
16988}
16989
16990// --- fasttest.U32IncrOpt.pmask.ClearBits
16991// Zero in PARENT any bits that are set in RHS.
16992inline void fasttest::pmask_ClearBits(fasttest::U32IncrOpt& parent, fasttest::U32IncrOpt &rhs) {
16993    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
16994    for (u64 i = 0; i < n; i++) {
16995        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
16996    }
16997}
16998
16999// --- fasttest.U32IncrOpt.pmask.OrBits
17000// Set PARENT to union of two bitsets.
17001// (This function is not named Set.. to avoid triple entendre).
17002inline void fasttest::pmask_OrBits(fasttest::U32IncrOpt& parent, fasttest::U32IncrOpt &rhs) {
17003    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
17004    for (u64 i = 0; i < n; i++) {
17005        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
17006    }
17007}
17008
17009// --- fasttest.U32IncrOpt.pmask.Sup
17010// Return smallest number N such that indexes of all 1 bits are below N
17011inline i32 fasttest::pmask_Sup(fasttest::U32IncrOpt& parent) {
17012    u64 lim = pmask_N(parent);
17013    i32 ret = 0;
17014    for (int i = lim-1; i >= 0; i--) {
17015        u32 &val = pmask_qFind(parent, i);
17016        if (val) {
17017            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
17018            ret = i * 32 + bitidx;
17019            break;
17020        }
17021    }
17022    return ret;
17023}
17024
17025// --- fasttest.U32IncrOpt.Value103.PresentQ
17026// Return true if the field is marked in the presence mask
17027inline bool fasttest::Value103_PresentQ(fasttest::U32IncrOpt& parent) {
17028    return pmask_qGetBit(parent, 0);
17029}
17030
17031// --- fasttest.U32IncrOpt.Value103.SetPresent
17032// Set presence bit for this field in the pmask
17033inline void fasttest::Value103_SetPresent(fasttest::U32IncrOpt& parent) {
17034    pmask_qSetBit(parent, 0); // mark presence in pmask
17035}
17036
17037// --- fasttest.U32IncrOpt.Value103.Present_GetBit
17038// Return field's bit number in the pmask
17039inline int fasttest::Value103_Present_GetBit(fasttest::U32IncrOpt& parent) {
17040    int retval = 0;
17041    (void)parent;//only to avoid -Wunused-parameter
17042    return retval;
17043}
17044
17045// --- fasttest.U32IncrOpt.Value103.Set
17046inline void fasttest::Value103_Set(fasttest::U32IncrOpt& parent, u32 rhs) {
17047    parent.Value103 = rhs;
17048    pmask_qSetBit(parent, 0); // mark presence in pmask
17049}
17050
17051// --- fasttest.U32IncrOpt.pmask_bitcurs.Reset
17052inline void fasttest::U32IncrOpt_pmask_bitcurs_Reset(U32IncrOpt_pmask_bitcurs &curs, fasttest::U32IncrOpt &parent) {
17053    curs.elems = &pmask_qFind(parent,0);
17054    curs.n_elems = pmask_N(parent);
17055    curs.bit = -1;
17056    U32IncrOpt_pmask_bitcurs_Next(curs);
17057}
17058
17059// --- fasttest.U32IncrOpt.pmask_bitcurs.ValidQ
17060// cursor points to valid item
17061inline bool fasttest::U32IncrOpt_pmask_bitcurs_ValidQ(U32IncrOpt_pmask_bitcurs &curs) {
17062    return curs.bit < curs.n_elems*32;
17063}
17064
17065// --- fasttest.U32IncrOpt.pmask_bitcurs.Access
17066// item access
17067inline int& fasttest::U32IncrOpt_pmask_bitcurs_Access(U32IncrOpt_pmask_bitcurs &curs) {
17068    return curs.bit;
17069}
17070
17071// --- fasttest.U32IncrOpt..GetMsgLength
17072// Message length (uses length field)
17073inline i32 fasttest::GetMsgLength(const fasttest::U32IncrOpt& parent) {
17074    return i32(const_cast<fasttest::U32IncrOpt&>(parent).length);
17075}
17076
17077// --- fasttest.U32IncrOpt..GetMsgMemptr
17078// Memptr encompassing the message (uses length field)
17079inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32IncrOpt& row) {
17080    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32IncrOpt&>(row).length));
17081}
17082
17083// --- fasttest.U32IncrOpt..Init
17084// Set all fields to initial values.
17085inline void fasttest::U32IncrOpt_Init(fasttest::U32IncrOpt& parent) {
17086    parent.length = u32(ssizeof(parent) + (0));
17087    parent.id = u32(103);
17088    parent.pmask = u32(0);
17089    parent.Value103 = u32(103);
17090}
17091inline fasttest::U32None::U32None() {
17092    fasttest::U32None_Init(*this);
17093}
17094
17095
17096// --- fasttest.U32None.base.Castdown
17097// Check if fasttest::TemplateHeader is an instance of U32None by checking the type field
17098// If it is, return the pointer of target type.
17099// Additionally, check if the length field permits valid instance of U32None.
17100// If not successful, quietly return NULL.
17101inline fasttest::U32None* fasttest::U32None_Castdown(fasttest::TemplateHeader &hdr) {
17102    bool cond = hdr.id == (3);
17103    cond &= i32(hdr.length) >= ssizeof(fasttest::U32None);
17104    return cond ? reinterpret_cast<fasttest::U32None*>(&hdr) : NULL;
17105}
17106
17107// --- fasttest.U32None.base.Castbase
17108inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32None& parent) {
17109    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
17110}
17111
17112// --- fasttest.U32None..GetMsgLength
17113// Message length (uses length field)
17114inline i32 fasttest::GetMsgLength(const fasttest::U32None& parent) {
17115    return i32(const_cast<fasttest::U32None&>(parent).length);
17116}
17117
17118// --- fasttest.U32None..GetMsgMemptr
17119// Memptr encompassing the message (uses length field)
17120inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32None& row) {
17121    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32None&>(row).length));
17122}
17123
17124// --- fasttest.U32None..Init
17125// Set all fields to initial values.
17126inline void fasttest::U32None_Init(fasttest::U32None& parent) {
17127    parent.length = u32(ssizeof(parent) + (0));
17128    parent.id = u32(3);
17129    parent.Value = u32(0);
17130}
17131inline fasttest::U32NoneOpt::U32NoneOpt() {
17132    fasttest::U32NoneOpt_Init(*this);
17133}
17134
17135
17136// --- fasttest.U32NoneOpt.base.Castdown
17137// Check if fasttest::TemplateHeader is an instance of U32NoneOpt by checking the type field
17138// If it is, return the pointer of target type.
17139// Additionally, check if the length field permits valid instance of U32NoneOpt.
17140// If not successful, quietly return NULL.
17141inline fasttest::U32NoneOpt* fasttest::U32NoneOpt_Castdown(fasttest::TemplateHeader &hdr) {
17142    bool cond = hdr.id == (4);
17143    cond &= i32(hdr.length) >= ssizeof(fasttest::U32NoneOpt);
17144    return cond ? reinterpret_cast<fasttest::U32NoneOpt*>(&hdr) : NULL;
17145}
17146
17147// --- fasttest.U32NoneOpt.base.Castbase
17148inline fasttest::TemplateHeader& fasttest::Castbase(fasttest::U32NoneOpt& parent) {
17149    return reinterpret_cast<fasttest::TemplateHeader&>(parent);
17150}
17151
17152// --- fasttest.U32NoneOpt.pmask.N
17153// Return constant 1
17154inline int fasttest::pmask_N(fasttest::U32NoneOpt& parent) {
17155    (void)parent;
17156    return 1;
17157}
17158
17159// --- fasttest.U32NoneOpt.pmask.qFind
17160// Access value
17161inline u32& fasttest::pmask_qFind(fasttest::U32NoneOpt& parent, int) {
17162    return parent.pmask;
17163}
17164
17165// --- fasttest.U32NoneOpt.pmask.NBits
17166// Get max # of bits in the bitset
17167// Return max. number of bits supported by array
17168inline int fasttest::pmask_Nbits(fasttest::U32NoneOpt& parent) {
17169    return pmask_N(parent) * 32;
17170}
17171
17172// --- fasttest.U32NoneOpt.pmask.qGetBit
17173// Retrieve value of bit #BIT_IDX in bit set. No bounds checking
17174inline bool fasttest::pmask_qGetBit(fasttest::U32NoneOpt& parent, u32 bit_idx) {
17175    u64 elem_idx = bit_idx >> 5;
17176    u64 shift = bit_idx & 31;
17177    u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
17178    return bool((elem >> shift) & 1); // extract bit
17179}
17180
17181// --- fasttest.U32NoneOpt.pmask.GetBit
17182// Retrieve value of bit #BIT_IDX in bit set. If bit index is out of bounds, return 0.
17183inline bool fasttest::pmask_GetBit(fasttest::U32NoneOpt& parent, u32 bit_idx) {
17184    u64 elem_idx = bit_idx >> 5;
17185    u64 shift = bit_idx & 31;
17186    bool ret = false;
17187    u64 lim = pmask_N(parent);
17188    if (elem_idx < lim) {
17189        u32 &elem = pmask_qFind(parent, elem_idx); // fetch element
17190        ret = (elem >> shift) & 1;                 // extract bit
17191    }
17192    return ret;
17193}
17194
17195// --- fasttest.U32NoneOpt.pmask.BitsEmptyQ
17196// Check if all the bits in the bitset are equal to zero
17197inline bool fasttest::pmask_BitsEmptyQ(fasttest::U32NoneOpt& parent) {
17198    bool retval = true;
17199    u64 n = pmask_N(parent);
17200    for (u64 i = 0; i < n; i++) {
17201        if (pmask_qFind(parent,i) != 0) {
17202            retval = false;
17203            break;
17204        }
17205    }
17206    return retval;
17207}
17208
17209// --- fasttest.U32NoneOpt.pmask.Sum1s
17210inline u64 fasttest::pmask_Sum1s(fasttest::U32NoneOpt& parent) {
17211    u64 sum = 0;
17212    u64 n = pmask_N(parent);
17213    for (u64 i = 0; i < n; i++) {
17214        sum += algo::u32_Count1s(pmask_qFind(parent, i));
17215    }
17216    return sum;
17217}
17218
17219// --- fasttest.U32NoneOpt.pmask.qClearBit
17220// Clear bit # BIT_IDX in bit set. No bounds checking
17221inline void fasttest::pmask_qClearBit(fasttest::U32NoneOpt& parent, u32 bit_idx) {
17222    u64 elem_idx = bit_idx >> 5;
17223    u64 shift = bit_idx & 31;
17224    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
17225    elem = elem & ~(u32(1) << shift); // clear bit
17226}
17227
17228// --- fasttest.U32NoneOpt.pmask.ClearBit
17229// Clear bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing
17230inline void fasttest::pmask_ClearBit(fasttest::U32NoneOpt& parent, u32 bit_idx) {
17231    u64 elem_idx = bit_idx >> 5;
17232    u64 shift = bit_idx & 31;
17233    u64 lim = pmask_N(parent);
17234    if (elem_idx < lim) {
17235        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
17236        elem = elem & ~(u32(1) << shift); // clear bit
17237    }
17238}
17239
17240// --- fasttest.U32NoneOpt.pmask.qSetBit
17241// Set bit # BIT_IDX in bit set. No bounds checking
17242inline void fasttest::pmask_qSetBit(fasttest::U32NoneOpt& parent, u32 bit_idx) {
17243    u64 elem_idx = bit_idx >> 5;
17244    u64 shift = bit_idx & 31;
17245    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
17246    elem = elem | (u32(1) << shift); // set bit
17247}
17248
17249// --- fasttest.U32NoneOpt.pmask.SetBit
17250// Set bit # BIT_IDX in bit set. If bit index is out of bounds, do nothing.
17251inline void fasttest::pmask_SetBit(fasttest::U32NoneOpt& parent, u32 bit_idx) {
17252    u64 elem_idx = bit_idx >> 5;
17253    u64 shift = bit_idx & 31;
17254    u64 lim = pmask_N(parent);
17255    if (elem_idx < lim) {
17256        u32 &elem = pmask_qFind(parent, elem_idx); // fetch
17257        elem = elem | (u32(1) << shift); // set bit
17258    }
17259}
17260
17261// --- fasttest.U32NoneOpt.pmask.qSetBitVal
17262// Set bit # BIT_IDX in bit set. No bounds checking
17263inline void fasttest::pmask_qSetBitVal(fasttest::U32NoneOpt& parent, u32 bit_idx, bool val) {
17264    u64 elem_idx = bit_idx >> 5;
17265    u64 shift = bit_idx & 31;
17266    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
17267    elem = (elem & ~(u32(1) << shift)) | (u32(val) << shift); // insert new value
17268}
17269
17270// --- fasttest.U32NoneOpt.pmask.qOrBitVal
17271// Or bit # BIT_IDX in bit set. No bounds checking
17272inline void fasttest::pmask_qOrBitVal(fasttest::U32NoneOpt& parent, u32 bit_idx, bool val) {
17273    u64 elem_idx = bit_idx >> 5;
17274    u64 shift = bit_idx & 31;
17275    u32 &elem = pmask_qFind(parent, elem_idx); // fetch
17276    elem = elem | (u32(val) << shift); // Or in val into elem
17277}
17278
17279// --- fasttest.U32NoneOpt.pmask.ClearBitsAll
17280// Set all bits of array to zero.
17281// Note: this does not change what NBits will return.
17282inline void fasttest::pmask_ClearBitsAll(fasttest::U32NoneOpt& parent) {
17283    u64 n = pmask_N(parent);
17284    for (u64 i = 0; i < n; i++) {
17285        pmask_qFind(parent, i) = 0;
17286    }
17287}
17288
17289// --- fasttest.U32NoneOpt.pmask.ClearBits
17290// Zero in PARENT any bits that are set in RHS.
17291inline void fasttest::pmask_ClearBits(fasttest::U32NoneOpt& parent, fasttest::U32NoneOpt &rhs) {
17292    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
17293    for (u64 i = 0; i < n; i++) {
17294        pmask_qFind(parent, i) &= ~pmask_qFind(rhs, i);
17295    }
17296}
17297
17298// --- fasttest.U32NoneOpt.pmask.OrBits
17299// Set PARENT to union of two bitsets.
17300// (This function is not named Set.. to avoid triple entendre).
17301inline void fasttest::pmask_OrBits(fasttest::U32NoneOpt& parent, fasttest::U32NoneOpt &rhs) {
17302    u64 n = u64_Min(pmask_N(parent), pmask_N(rhs));
17303    for (u64 i = 0; i < n; i++) {
17304        pmask_qFind(parent, i) |= pmask_qFind(rhs, i);
17305    }
17306}
17307
17308// --- fasttest.U32NoneOpt.pmask.Sup
17309// Return smallest number N such that indexes of all 1 bits are below N
17310inline i32 fasttest::pmask_Sup(fasttest::U32NoneOpt& parent) {
17311    u64 lim = pmask_N(parent);
17312    i32 ret = 0;
17313    for (int i = lim-1; i >= 0; i--) {
17314        u32 &val = pmask_qFind(parent, i);
17315        if (val) {
17316            u32 bitidx = algo::u64_BitScanReverse(val) + 1;
17317            ret = i * 32 + bitidx;
17318            break;
17319        }
17320    }
17321    return ret;
17322}
17323
17324// --- fasttest.U32NoneOpt.Value.PresentQ
17325// Return true if the field is marked in the presence mask
17326inline bool fasttest::Value_PresentQ(fasttest::U32NoneOpt& parent) {
17327    return pmask_qGetBit(parent, 0);
17328}
17329
17330// --- fasttest.U32NoneOpt.Value.SetPresent
17331// Set presence bit for this field in the pmask
17332inline void fasttest::Value_SetPresent(fasttest::U32NoneOpt& parent) {
17333    pmask_qSetBit(parent, 0); // mark presence in pmask
17334}
17335
17336// --- fasttest.U32NoneOpt.Value.Present_GetBit
17337// Return field's bit number in the pmask
17338inline int fasttest::Value_Present_GetBit(fasttest::U32NoneOpt& parent) {
17339    int retval = 0;
17340    (void)parent;//only to avoid -Wunused-parameter
17341    return retval;
17342}
17343
17344// --- fasttest.U32NoneOpt.Value.Set
17345inline void fasttest::Value_Set(fasttest::U32NoneOpt& parent, u32 rhs) {
17346    parent.Value = rhs;
17347    pmask_qSetBit(parent, 0); // mark presence in pmask
17348}
17349
17350// --- fasttest.U32NoneOpt.pmask_bitcurs.Reset
17351inline void fasttest::U32NoneOpt_pmask_bitcurs_Reset(U32NoneOpt_pmask_bitcurs &curs, fasttest::U32NoneOpt &parent) {
17352    curs.elems = &pmask_qFind(parent,0);
17353    curs.n_elems = pmask_N(parent);
17354    curs.bit = -1;
17355    U32NoneOpt_pmask_bitcurs_Next(curs);
17356}
17357
17358// --- fasttest.U32NoneOpt.pmask_bitcurs.ValidQ
17359// cursor points to valid item
17360inline bool fasttest::U32NoneOpt_pmask_bitcurs_ValidQ(U32NoneOpt_pmask_bitcurs &curs) {
17361    return curs.bit < curs.n_elems*32;
17362}
17363
17364// --- fasttest.U32NoneOpt.pmask_bitcurs.Access
17365// item access
17366inline int& fasttest::U32NoneOpt_pmask_bitcurs_Access(U32NoneOpt_pmask_bitcurs &curs) {
17367    return curs.bit;
17368}
17369
17370// --- fasttest.U32NoneOpt..GetMsgLength
17371// Message length (uses length field)
17372inline i32 fasttest::GetMsgLength(const fasttest::U32NoneOpt& parent) {
17373    return i32(const_cast<fasttest::U32NoneOpt&>(parent).length);
17374}
17375
17376// --- fasttest.U32NoneOpt..GetMsgMemptr
17377// Memptr encompassing the message (uses length field)
17378inline algo::memptr fasttest::GetMsgMemptr(const fasttest::U32NoneOpt& row) {
17379    return algo::memptr((u8*)&row, i32(const_cast<fasttest::U32NoneOpt&>(row).length));
17380}
17381
17382// --- fasttest.U32NoneOpt..Init
17383// Set all fields to initial values.
17384inline void fasttest::U32NoneOpt_Init(fasttest::U32NoneOpt& parent) {
17385    parent.length = u32(ssizeof(parent) + (0));
17386    parent.id = u32(4);
17387    parent.pmask = u32(0);
17388    parent.Value = u32(0);
17389}
17390
17391inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVConst &row) {// cfmt:fasttest.BVConst.String
17392    fasttest::BVConst_Print(const_cast<fasttest::BVConst&>(row), str);
17393    return str;
17394}
17395
17396inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVConstOpt &row) {// cfmt:fasttest.BVConstOpt.String
17397    fasttest::BVConstOpt_Print(const_cast<fasttest::BVConstOpt&>(row), str);
17398    return str;
17399}
17400
17401inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVCopy &row) {// cfmt:fasttest.BVCopy.String
17402    fasttest::BVCopy_Print(const_cast<fasttest::BVCopy&>(row), str);
17403    return str;
17404}
17405
17406inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVCopyNull &row) {// cfmt:fasttest.BVCopyNull.String
17407    fasttest::BVCopyNull_Print(const_cast<fasttest::BVCopyNull&>(row), str);
17408    return str;
17409}
17410
17411inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVCopyOpt &row) {// cfmt:fasttest.BVCopyOpt.String
17412    fasttest::BVCopyOpt_Print(const_cast<fasttest::BVCopyOpt&>(row), str);
17413    return str;
17414}
17415
17416inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVDflt &row) {// cfmt:fasttest.BVDflt.String
17417    fasttest::BVDflt_Print(const_cast<fasttest::BVDflt&>(row), str);
17418    return str;
17419}
17420
17421inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVDfltNull &row) {// cfmt:fasttest.BVDfltNull.String
17422    fasttest::BVDfltNull_Print(const_cast<fasttest::BVDfltNull&>(row), str);
17423    return str;
17424}
17425
17426inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVDfltOpt &row) {// cfmt:fasttest.BVDfltOpt.String
17427    fasttest::BVDfltOpt_Print(const_cast<fasttest::BVDfltOpt&>(row), str);
17428    return str;
17429}
17430
17431inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVNone &row) {// cfmt:fasttest.BVNone.String
17432    fasttest::BVNone_Print(const_cast<fasttest::BVNone&>(row), str);
17433    return str;
17434}
17435
17436inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::BVNoneOpt &row) {// cfmt:fasttest.BVNoneOpt.String
17437    fasttest::BVNoneOpt_Print(const_cast<fasttest::BVNoneOpt&>(row), str);
17438    return str;
17439}
17440
17441inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleEnum &row) {// cfmt:fasttest.SampleEnum.String
17442    fasttest::SampleEnum_Print(const_cast<fasttest::SampleEnum&>(row), str);
17443    return str;
17444}
17445
17446inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleSet &row) {// cfmt:fasttest.SampleSet.String
17447    fasttest::SampleSet_Print(const_cast<fasttest::SampleSet&>(row), str);
17448    return str;
17449}
17450
17451inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::FieldId &row) {// cfmt:fasttest.FieldId.String
17452    fasttest::FieldId_Print(const_cast<fasttest::FieldId&>(row), str);
17453    return str;
17454}
17455
17456inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::FirstSeq &row) {// cfmt:fasttest.FirstSeq.String
17457    fasttest::FirstSeq_Print(const_cast<fasttest::FirstSeq&>(row), str);
17458    return str;
17459}
17460
17461inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::OptSgmGrp &row) {// cfmt:fasttest.OptSgmGrp.String
17462    fasttest::OptSgmGrp_Print(const_cast<fasttest::OptSgmGrp&>(row), str);
17463    return str;
17464}
17465
17466inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::GroupSgmOpt &row) {// cfmt:fasttest.GroupSgmOpt.String
17467    fasttest::GroupSgmOpt_Print(const_cast<fasttest::GroupSgmOpt&>(row), str);
17468    return str;
17469}
17470
17471inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvGrp &row) {// cfmt:fasttest.TrvGrp.String
17472    fasttest::TrvGrp_Print(const_cast<fasttest::TrvGrp&>(row), str);
17473    return str;
17474}
17475
17476inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::GroupTrv &row) {// cfmt:fasttest.GroupTrv.String
17477    fasttest::GroupTrv_Print(const_cast<fasttest::GroupTrv&>(row), str);
17478    return str;
17479}
17480
17481inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::OptTrvGrp &row) {// cfmt:fasttest.OptTrvGrp.String
17482    fasttest::OptTrvGrp_Print(const_cast<fasttest::OptTrvGrp&>(row), str);
17483    return str;
17484}
17485
17486inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::GroupTrvOpt &row) {// cfmt:fasttest.GroupTrvOpt.String
17487    fasttest::GroupTrvOpt_Print(const_cast<fasttest::GroupTrvOpt&>(row), str);
17488    return str;
17489}
17490
17491inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32Const &row) {// cfmt:fasttest.I32Const.String
17492    fasttest::I32Const_Print(const_cast<fasttest::I32Const&>(row), str);
17493    return str;
17494}
17495
17496inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32ConstOpt &row) {// cfmt:fasttest.I32ConstOpt.String
17497    fasttest::I32ConstOpt_Print(const_cast<fasttest::I32ConstOpt&>(row), str);
17498    return str;
17499}
17500
17501inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32Copy &row) {// cfmt:fasttest.I32Copy.String
17502    fasttest::I32Copy_Print(const_cast<fasttest::I32Copy&>(row), str);
17503    return str;
17504}
17505
17506inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32CopyNull &row) {// cfmt:fasttest.I32CopyNull.String
17507    fasttest::I32CopyNull_Print(const_cast<fasttest::I32CopyNull&>(row), str);
17508    return str;
17509}
17510
17511inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32CopyOpt &row) {// cfmt:fasttest.I32CopyOpt.String
17512    fasttest::I32CopyOpt_Print(const_cast<fasttest::I32CopyOpt&>(row), str);
17513    return str;
17514}
17515
17516inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32Delta &row) {// cfmt:fasttest.I32Delta.String
17517    fasttest::I32Delta_Print(const_cast<fasttest::I32Delta&>(row), str);
17518    return str;
17519}
17520
17521inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32DeltaImpl &row) {// cfmt:fasttest.I32DeltaImpl.String
17522    fasttest::I32DeltaImpl_Print(const_cast<fasttest::I32DeltaImpl&>(row), str);
17523    return str;
17524}
17525
17526inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32DeltaNull &row) {// cfmt:fasttest.I32DeltaNull.String
17527    fasttest::I32DeltaNull_Print(const_cast<fasttest::I32DeltaNull&>(row), str);
17528    return str;
17529}
17530
17531inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32DeltaOpt &row) {// cfmt:fasttest.I32DeltaOpt.String
17532    fasttest::I32DeltaOpt_Print(const_cast<fasttest::I32DeltaOpt&>(row), str);
17533    return str;
17534}
17535
17536inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32Dflt &row) {// cfmt:fasttest.I32Dflt.String
17537    fasttest::I32Dflt_Print(const_cast<fasttest::I32Dflt&>(row), str);
17538    return str;
17539}
17540
17541inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32DfltNull &row) {// cfmt:fasttest.I32DfltNull.String
17542    fasttest::I32DfltNull_Print(const_cast<fasttest::I32DfltNull&>(row), str);
17543    return str;
17544}
17545
17546inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32DfltOpt &row) {// cfmt:fasttest.I32DfltOpt.String
17547    fasttest::I32DfltOpt_Print(const_cast<fasttest::I32DfltOpt&>(row), str);
17548    return str;
17549}
17550
17551inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32Incr &row) {// cfmt:fasttest.I32Incr.String
17552    fasttest::I32Incr_Print(const_cast<fasttest::I32Incr&>(row), str);
17553    return str;
17554}
17555
17556inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32IncrNV &row) {// cfmt:fasttest.I32IncrNV.String
17557    fasttest::I32IncrNV_Print(const_cast<fasttest::I32IncrNV&>(row), str);
17558    return str;
17559}
17560
17561inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32IncrNull &row) {// cfmt:fasttest.I32IncrNull.String
17562    fasttest::I32IncrNull_Print(const_cast<fasttest::I32IncrNull&>(row), str);
17563    return str;
17564}
17565
17566inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32IncrOpt &row) {// cfmt:fasttest.I32IncrOpt.String
17567    fasttest::I32IncrOpt_Print(const_cast<fasttest::I32IncrOpt&>(row), str);
17568    return str;
17569}
17570
17571inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32None &row) {// cfmt:fasttest.I32None.String
17572    fasttest::I32None_Print(const_cast<fasttest::I32None&>(row), str);
17573    return str;
17574}
17575
17576inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::I32NoneOpt &row) {// cfmt:fasttest.I32NoneOpt.String
17577    fasttest::I32NoneOpt_Print(const_cast<fasttest::I32NoneOpt&>(row), str);
17578    return str;
17579}
17580
17581inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::MsgPmap &row) {// cfmt:fasttest.MsgPmap.String
17582    fasttest::MsgPmap_Print(const_cast<fasttest::MsgPmap&>(row), str);
17583    return str;
17584}
17585
17586inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::OptSgmSeq &row) {// cfmt:fasttest.OptSgmSeq.String
17587    fasttest::OptSgmSeq_Print(const_cast<fasttest::OptSgmSeq&>(row), str);
17588    return str;
17589}
17590
17591inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::OptTrvSeq &row) {// cfmt:fasttest.OptTrvSeq.String
17592    fasttest::OptTrvSeq_Print(const_cast<fasttest::OptTrvSeq&>(row), str);
17593    return str;
17594}
17595
17596inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::Reset &row) {// cfmt:fasttest.Reset.String
17597    fasttest::Reset_Print(const_cast<fasttest::Reset&>(row), str);
17598    return str;
17599}
17600
17601inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleEnumConst &row) {// cfmt:fasttest.SampleEnumConst.String
17602    fasttest::SampleEnumConst_Print(const_cast<fasttest::SampleEnumConst&>(row), str);
17603    return str;
17604}
17605
17606inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleEnumCopy &row) {// cfmt:fasttest.SampleEnumCopy.String
17607    fasttest::SampleEnumCopy_Print(const_cast<fasttest::SampleEnumCopy&>(row), str);
17608    return str;
17609}
17610
17611inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleEnumDefault &row) {// cfmt:fasttest.SampleEnumDefault.String
17612    fasttest::SampleEnumDefault_Print(const_cast<fasttest::SampleEnumDefault&>(row), str);
17613    return str;
17614}
17615
17616inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleSetConst &row) {// cfmt:fasttest.SampleSetConst.String
17617    fasttest::SampleSetConst_Print(const_cast<fasttest::SampleSetConst&>(row), str);
17618    return str;
17619}
17620
17621inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleSetCopy &row) {// cfmt:fasttest.SampleSetCopy.String
17622    fasttest::SampleSetCopy_Print(const_cast<fasttest::SampleSetCopy&>(row), str);
17623    return str;
17624}
17625
17626inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SampleSetDefault &row) {// cfmt:fasttest.SampleSetDefault.String
17627    fasttest::SampleSetDefault_Print(const_cast<fasttest::SampleSetDefault&>(row), str);
17628    return str;
17629}
17630
17631inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclConst &row) {// cfmt:fasttest.SclConst.String
17632    fasttest::SclConst_Print(const_cast<fasttest::SclConst&>(row), str);
17633    return str;
17634}
17635
17636inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclConstOpt &row) {// cfmt:fasttest.SclConstOpt.String
17637    fasttest::SclConstOpt_Print(const_cast<fasttest::SclConstOpt&>(row), str);
17638    return str;
17639}
17640
17641inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclCopy &row) {// cfmt:fasttest.SclCopy.String
17642    fasttest::SclCopy_Print(const_cast<fasttest::SclCopy&>(row), str);
17643    return str;
17644}
17645
17646inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclCopyNull &row) {// cfmt:fasttest.SclCopyNull.String
17647    fasttest::SclCopyNull_Print(const_cast<fasttest::SclCopyNull&>(row), str);
17648    return str;
17649}
17650
17651inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclCopyOpt &row) {// cfmt:fasttest.SclCopyOpt.String
17652    fasttest::SclCopyOpt_Print(const_cast<fasttest::SclCopyOpt&>(row), str);
17653    return str;
17654}
17655
17656inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclDelta &row) {// cfmt:fasttest.SclDelta.String
17657    fasttest::SclDelta_Print(const_cast<fasttest::SclDelta&>(row), str);
17658    return str;
17659}
17660
17661inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclDeltaImpl &row) {// cfmt:fasttest.SclDeltaImpl.String
17662    fasttest::SclDeltaImpl_Print(const_cast<fasttest::SclDeltaImpl&>(row), str);
17663    return str;
17664}
17665
17666inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclDeltaNull &row) {// cfmt:fasttest.SclDeltaNull.String
17667    fasttest::SclDeltaNull_Print(const_cast<fasttest::SclDeltaNull&>(row), str);
17668    return str;
17669}
17670
17671inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclDeltaOpt &row) {// cfmt:fasttest.SclDeltaOpt.String
17672    fasttest::SclDeltaOpt_Print(const_cast<fasttest::SclDeltaOpt&>(row), str);
17673    return str;
17674}
17675
17676inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclDflt &row) {// cfmt:fasttest.SclDflt.String
17677    fasttest::SclDflt_Print(const_cast<fasttest::SclDflt&>(row), str);
17678    return str;
17679}
17680
17681inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclDfltNull &row) {// cfmt:fasttest.SclDfltNull.String
17682    fasttest::SclDfltNull_Print(const_cast<fasttest::SclDfltNull&>(row), str);
17683    return str;
17684}
17685
17686inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclDfltOpt &row) {// cfmt:fasttest.SclDfltOpt.String
17687    fasttest::SclDfltOpt_Print(const_cast<fasttest::SclDfltOpt&>(row), str);
17688    return str;
17689}
17690
17691inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclNone &row) {// cfmt:fasttest.SclNone.String
17692    fasttest::SclNone_Print(const_cast<fasttest::SclNone&>(row), str);
17693    return str;
17694}
17695
17696inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SclNoneOpt &row) {// cfmt:fasttest.SclNoneOpt.String
17697    fasttest::SclNoneOpt_Print(const_cast<fasttest::SclNoneOpt&>(row), str);
17698    return str;
17699}
17700
17701inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SecondSeq &row) {// cfmt:fasttest.SecondSeq.String
17702    fasttest::SecondSeq_Print(const_cast<fasttest::SecondSeq&>(row), str);
17703    return str;
17704}
17705
17706inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqOrder &row) {// cfmt:fasttest.SeqOrder.String
17707    fasttest::SeqOrder_Print(const_cast<fasttest::SeqOrder&>(row), str);
17708    return str;
17709}
17710
17711inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqSgmOpt &row) {// cfmt:fasttest.SeqSgmOpt.String
17712    fasttest::SeqSgmOpt_Print(const_cast<fasttest::SeqSgmOpt&>(row), str);
17713    return str;
17714}
17715
17716inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvSeq &row) {// cfmt:fasttest.TrvSeq.String
17717    fasttest::TrvSeq_Print(const_cast<fasttest::TrvSeq&>(row), str);
17718    return str;
17719}
17720
17721inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrv &row) {// cfmt:fasttest.SeqTrv.String
17722    fasttest::SeqTrv_Print(const_cast<fasttest::SeqTrv&>(row), str);
17723    return str;
17724}
17725
17726inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvSeqLenConst &row) {// cfmt:fasttest.TrvSeqLenConst.String
17727    fasttest::TrvSeqLenConst_Print(const_cast<fasttest::TrvSeqLenConst&>(row), str);
17728    return str;
17729}
17730
17731inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrvLenConst &row) {// cfmt:fasttest.SeqTrvLenConst.String
17732    fasttest::SeqTrvLenConst_Print(const_cast<fasttest::SeqTrvLenConst&>(row), str);
17733    return str;
17734}
17735
17736inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvSeqLenConstOpt &row) {// cfmt:fasttest.TrvSeqLenConstOpt.String
17737    fasttest::TrvSeqLenConstOpt_Print(const_cast<fasttest::TrvSeqLenConstOpt&>(row), str);
17738    return str;
17739}
17740
17741inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrvLenConstOpt &row) {// cfmt:fasttest.SeqTrvLenConstOpt.String
17742    fasttest::SeqTrvLenConstOpt_Print(const_cast<fasttest::SeqTrvLenConstOpt&>(row), str);
17743    return str;
17744}
17745
17746inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvSeqLenDflt &row) {// cfmt:fasttest.TrvSeqLenDflt.String
17747    fasttest::TrvSeqLenDflt_Print(const_cast<fasttest::TrvSeqLenDflt&>(row), str);
17748    return str;
17749}
17750
17751inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrvLenDflt &row) {// cfmt:fasttest.SeqTrvLenDflt.String
17752    fasttest::SeqTrvLenDflt_Print(const_cast<fasttest::SeqTrvLenDflt&>(row), str);
17753    return str;
17754}
17755
17756inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvSeqDfltOpt &row) {// cfmt:fasttest.TrvSeqDfltOpt.String
17757    fasttest::TrvSeqDfltOpt_Print(const_cast<fasttest::TrvSeqDfltOpt&>(row), str);
17758    return str;
17759}
17760
17761inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrvLenDfltOpt &row) {// cfmt:fasttest.SeqTrvLenDfltOpt.String
17762    fasttest::SeqTrvLenDfltOpt_Print(const_cast<fasttest::SeqTrvLenDfltOpt&>(row), str);
17763    return str;
17764}
17765
17766inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvSeqLenNone &row) {// cfmt:fasttest.TrvSeqLenNone.String
17767    fasttest::TrvSeqLenNone_Print(const_cast<fasttest::TrvSeqLenNone&>(row), str);
17768    return str;
17769}
17770
17771inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrvLenNone &row) {// cfmt:fasttest.SeqTrvLenNone.String
17772    fasttest::SeqTrvLenNone_Print(const_cast<fasttest::SeqTrvLenNone&>(row), str);
17773    return str;
17774}
17775
17776inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TrvSeqLenNoneOpt &row) {// cfmt:fasttest.TrvSeqLenNoneOpt.String
17777    fasttest::TrvSeqLenNoneOpt_Print(const_cast<fasttest::TrvSeqLenNoneOpt&>(row), str);
17778    return str;
17779}
17780
17781inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrvLenNoneOpt &row) {// cfmt:fasttest.SeqTrvLenNoneOpt.String
17782    fasttest::SeqTrvLenNoneOpt_Print(const_cast<fasttest::SeqTrvLenNoneOpt&>(row), str);
17783    return str;
17784}
17785
17786inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::SeqTrvOpt &row) {// cfmt:fasttest.SeqTrvOpt.String
17787    fasttest::SeqTrvOpt_Print(const_cast<fasttest::SeqTrvOpt&>(row), str);
17788    return str;
17789}
17790
17791inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrConst &row) {// cfmt:fasttest.StrConst.String
17792    fasttest::StrConst_Print(const_cast<fasttest::StrConst&>(row), str);
17793    return str;
17794}
17795
17796inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrConstOpt &row) {// cfmt:fasttest.StrConstOpt.String
17797    fasttest::StrConstOpt_Print(const_cast<fasttest::StrConstOpt&>(row), str);
17798    return str;
17799}
17800
17801inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrCopy &row) {// cfmt:fasttest.StrCopy.String
17802    fasttest::StrCopy_Print(const_cast<fasttest::StrCopy&>(row), str);
17803    return str;
17804}
17805
17806inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrCopyNull &row) {// cfmt:fasttest.StrCopyNull.String
17807    fasttest::StrCopyNull_Print(const_cast<fasttest::StrCopyNull&>(row), str);
17808    return str;
17809}
17810
17811inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrCopyOpt &row) {// cfmt:fasttest.StrCopyOpt.String
17812    fasttest::StrCopyOpt_Print(const_cast<fasttest::StrCopyOpt&>(row), str);
17813    return str;
17814}
17815
17816inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrDflt &row) {// cfmt:fasttest.StrDflt.String
17817    fasttest::StrDflt_Print(const_cast<fasttest::StrDflt&>(row), str);
17818    return str;
17819}
17820
17821inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrDfltNull &row) {// cfmt:fasttest.StrDfltNull.String
17822    fasttest::StrDfltNull_Print(const_cast<fasttest::StrDfltNull&>(row), str);
17823    return str;
17824}
17825
17826inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrDfltOpt &row) {// cfmt:fasttest.StrDfltOpt.String
17827    fasttest::StrDfltOpt_Print(const_cast<fasttest::StrDfltOpt&>(row), str);
17828    return str;
17829}
17830
17831inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrNone &row) {// cfmt:fasttest.StrNone.String
17832    fasttest::StrNone_Print(const_cast<fasttest::StrNone&>(row), str);
17833    return str;
17834}
17835
17836inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::StrNoneOpt &row) {// cfmt:fasttest.StrNoneOpt.String
17837    fasttest::StrNoneOpt_Print(const_cast<fasttest::StrNoneOpt&>(row), str);
17838    return str;
17839}
17840
17841inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::TemplateHeader &row) {// cfmt:fasttest.TemplateHeader.String
17842    fasttest::TemplateHeader_Print(const_cast<fasttest::TemplateHeader&>(row), str);
17843    return str;
17844}
17845
17846inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32Const &row) {// cfmt:fasttest.U32Const.String
17847    fasttest::U32Const_Print(const_cast<fasttest::U32Const&>(row), str);
17848    return str;
17849}
17850
17851inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32ConstOpt &row) {// cfmt:fasttest.U32ConstOpt.String
17852    fasttest::U32ConstOpt_Print(const_cast<fasttest::U32ConstOpt&>(row), str);
17853    return str;
17854}
17855
17856inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32Copy &row) {// cfmt:fasttest.U32Copy.String
17857    fasttest::U32Copy_Print(const_cast<fasttest::U32Copy&>(row), str);
17858    return str;
17859}
17860
17861inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32CopyNull &row) {// cfmt:fasttest.U32CopyNull.String
17862    fasttest::U32CopyNull_Print(const_cast<fasttest::U32CopyNull&>(row), str);
17863    return str;
17864}
17865
17866inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32CopyOpt &row) {// cfmt:fasttest.U32CopyOpt.String
17867    fasttest::U32CopyOpt_Print(const_cast<fasttest::U32CopyOpt&>(row), str);
17868    return str;
17869}
17870
17871inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32Delta &row) {// cfmt:fasttest.U32Delta.String
17872    fasttest::U32Delta_Print(const_cast<fasttest::U32Delta&>(row), str);
17873    return str;
17874}
17875
17876inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32DeltaImpl &row) {// cfmt:fasttest.U32DeltaImpl.String
17877    fasttest::U32DeltaImpl_Print(const_cast<fasttest::U32DeltaImpl&>(row), str);
17878    return str;
17879}
17880
17881inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32DeltaNull &row) {// cfmt:fasttest.U32DeltaNull.String
17882    fasttest::U32DeltaNull_Print(const_cast<fasttest::U32DeltaNull&>(row), str);
17883    return str;
17884}
17885
17886inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32DeltaOpt &row) {// cfmt:fasttest.U32DeltaOpt.String
17887    fasttest::U32DeltaOpt_Print(const_cast<fasttest::U32DeltaOpt&>(row), str);
17888    return str;
17889}
17890
17891inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32Dflt &row) {// cfmt:fasttest.U32Dflt.String
17892    fasttest::U32Dflt_Print(const_cast<fasttest::U32Dflt&>(row), str);
17893    return str;
17894}
17895
17896inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32DfltNull &row) {// cfmt:fasttest.U32DfltNull.String
17897    fasttest::U32DfltNull_Print(const_cast<fasttest::U32DfltNull&>(row), str);
17898    return str;
17899}
17900
17901inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32DfltOpt &row) {// cfmt:fasttest.U32DfltOpt.String
17902    fasttest::U32DfltOpt_Print(const_cast<fasttest::U32DfltOpt&>(row), str);
17903    return str;
17904}
17905
17906inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32Incr &row) {// cfmt:fasttest.U32Incr.String
17907    fasttest::U32Incr_Print(const_cast<fasttest::U32Incr&>(row), str);
17908    return str;
17909}
17910
17911inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32IncrNV &row) {// cfmt:fasttest.U32IncrNV.String
17912    fasttest::U32IncrNV_Print(const_cast<fasttest::U32IncrNV&>(row), str);
17913    return str;
17914}
17915
17916inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32IncrNull &row) {// cfmt:fasttest.U32IncrNull.String
17917    fasttest::U32IncrNull_Print(const_cast<fasttest::U32IncrNull&>(row), str);
17918    return str;
17919}
17920
17921inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32IncrOpt &row) {// cfmt:fasttest.U32IncrOpt.String
17922    fasttest::U32IncrOpt_Print(const_cast<fasttest::U32IncrOpt&>(row), str);
17923    return str;
17924}
17925
17926inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32None &row) {// cfmt:fasttest.U32None.String
17927    fasttest::U32None_Print(const_cast<fasttest::U32None&>(row), str);
17928    return str;
17929}
17930
17931inline algo::cstring &algo::operator <<(algo::cstring &str, const fasttest::U32NoneOpt &row) {// cfmt:fasttest.U32NoneOpt.String
17932    fasttest::U32NoneOpt_Print(const_cast<fasttest::U32NoneOpt&>(row), str);
17933    return str;
17934}